String Foramt - parameters problem.

P

Przemek

Hi
I've got a little problem here
the sample code is:

int ID = 100;

String *sqlcommand=
String::Format(S" INSERT INTO Customers ([#ID], Name, SureName,
BirthDay, Position)
VALUES ({0}, '{1}', '{2}', '{3}', 'aaaaa')",
ID.ToString(), TextBox->Text, textBox2->Text,
textBox3->Text);

and all is ok, but if I using 3 parameters {3} in Format function there is a
error calls: Format function can't take 5 arguments,
I can use {0}, {1}, {2} arg's - but {3} make that Error.
How Can I Format that String using more than 3 {} arg's?
 
K

Karl Heinz Buchegger

Przemek said:
Hi
I've got a little problem here
the sample code is:

int ID = 100;

String *sqlcommand=
String::Format(S" INSERT INTO Customers ([#ID], Name, SureName,
BirthDay, Position)
VALUES ({0}, '{1}', '{2}', '{3}', 'aaaaa')",
ID.ToString(), TextBox->Text, textBox2->Text,
textBox3->Text);

and all is ok, but if I using 3 parameters {3} in Format function there is a
error calls: Format function can't take 5 arguments,
I can use {0}, {1}, {2} arg's - but {3} make that Error.
How Can I Format that String using more than 3 {} arg's?

????
What's that?
It looks like it is related to C++, but it can't be standard C++
since that doesn't have a class String, nor is there a Format function.

Is this something platform specific?
Then you should ask in a newsgroup dedicated to your platform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top