By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,294 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

String Foramt - parameters problem.

P: n/a
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?
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Przemek wrote:

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.

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.