MySQL Forums
Forum List  »  Connector/ODBC

ADO.Insert truncates wrong!
Posted by: Alfonso Sanz
Date: January 24, 2005 11:11AM

Hello,

I have the following table:
field_1 varchar(50)
field_2 varchar(255)
A1 text
idx int(11) *PRIMARY KEY

I use an ODBC-Connection with DELPHI to insert new Items in the table.
I have the following effect:
Assume I have in the table the following content in field_1:
"Text12345" (9 characters)
"Text123"
"Text12"

Now I do via ADO an insert statement:
ADO.Insert;
ADO['field_1']:='Alfonso Sanz Alonso 1234567890';
ADO.Post;

If I look now at the content of the table, I find a new Record with this entry for field_1:
"Alfonso S" (9 characters)

It has been truncated to the length of the biggest entry in the table. If the biggest entry is 20 characters long, it will be truncated to 20.

Does anyone know the problem?

I'm using ODBC for MySQL Ver. 2.50.39 with Windows XP.

bye
Alfonso

Options: ReplyQuote


Subject
Written By
Posted
ADO.Insert truncates wrong!
January 24, 2005 11:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.