473,465 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

String Foramt - parameters problem.

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
1 1280
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Niyazi | last post by:
Hi I am trying to insert some value into SQL Server 2000 tables and I am keep getting the "Input string was not in a correct format" error. When user fills the Form it updates the table call...
18
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
8
by: johnsto | last post by:
I'm really stuck - can someone help me! I've got a basic setup consisting of two things: 1. A C# web service 2. An unmanaged C++ DLL The WS is intended to call some functions in the DLL. The...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
3
by: Dominique Vandensteen | last post by:
after the very small & vs string.format discussion I did some speed tests... loop of 1.000.000 concatenations of 5 public string variables in a class gave following results: result = a & b...
16
by: Mark A. Sam | last post by:
Hello, I am having a problem with imputting into a string variable: Dim strSQL As String = "INSERT INTO tblContactForm1 (txtName, txtCompany, txtPhone, txtEmail, txtComment, chkGrower,...
2
by: Marek | last post by:
Hi I need to be able to return a string from a VB6 method: Public Sub GetMessageAsParameter(ByRef message As String) message = "GetMessageAsParameter worked!" End Sub which is implemented...
15
by: cj | last post by:
I've got a long string to be written to a field in a sql db table via stored procedure. For some reason I find only 258 chars are being written. Any ideas? relevant bits of my VB2005 code: ...
9
by: =?Utf-8?B?TmVpbEdvdHQ=?= | last post by:
I am trying to format a decimal number such as 0.0567 but forgot how to do formatting in C#. I tried the old C format escape sequence "\8.3f" the old C style but does not work. example:...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.