MySQL Forums
Forum List  »  Other Migration

numric data truncated
Posted by: Tarik ALKATHIRI
Date: April 06, 2008 09:27AM

Dear All;
I am trying to insert some data into mysql table as follow:
Public aErrorArray(7)
A1="ABC"
A2="100"
A3="DESC"
A4=6
aErrorArray = 0
= SQLSetprop(Nc, 'Transactions', 2)
= SQLExec(Nc, "INSERT INTO MYTABLE (X1,X2,X3,X4);
VALUES ('&A1','&A2','&A3','&A4')")
= Aerror(aErrorArray)

If aErrorArray(1) = 0
Sqlcommit(Nc)
ENDIF

but it gives me the following error :

Connectivity error: [MySQL][ODBC 3.51 Driver][mysqld-5.1.23-rc-community]Data truncated for column 'X4' at row 1"
"[MySQL][ODBC 3.51 Driver][mysqld-5.1.23-rc-community]Data truncated for column 'X4' at row 1"

If I put the 6 direct in place of '&A4' like this '6' it works fine and it saves the record correct in the table.
the field type in mysql table is float but I have tried various types it did not work.
Any solution please, thanks in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
numric data truncated
6800
April 06, 2008 09:27AM
4255
April 21, 2008 11:51PM


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.