xor2
Programmer
- Mar 24, 2005
- 22
Hi,
I have downloaded odbc driver 3.51 v, installed it and configure in Control Panel/Administrative Tools/Odbc Source.
I have successfully connected in delphi through ADO and the problem is with SQL - insert - statement.
I have a field: 'Percent' float NOT NULL.
These lines, I use to insert data:
adoMySQL.sql.clear;
adoMySQL.sql.add ('insert into sth valuesp1, 2, 3, 4, 5 ); ');
Parameters from p1 to p4 ....
adoMySQL.Parameters.ParamByName ('p5').Value := 4.5;
adoMySQL.ExecSQL;
it fails on last one (real type Field) with error:
Data truncated for column 'Percent' on line 1 ...
However if i try to execute this sql straight in my Mysql Manager program
it works good ....
Please help, what is wrong ??
Thank you for any help
I have downloaded odbc driver 3.51 v, installed it and configure in Control Panel/Administrative Tools/Odbc Source.
I have successfully connected in delphi through ADO and the problem is with SQL - insert - statement.
I have a field: 'Percent' float NOT NULL.
These lines, I use to insert data:
adoMySQL.sql.clear;
adoMySQL.sql.add ('insert into sth valuesp1, 2, 3, 4, 5 ); ');
Parameters from p1 to p4 ....
adoMySQL.Parameters.ParamByName ('p5').Value := 4.5;
adoMySQL.ExecSQL;
it fails on last one (real type Field) with error:
Data truncated for column 'Percent' on line 1 ...
However if i try to execute this sql straight in my Mysql Manager program
it works good ....
Please help, what is wrong ??
Thank you for any help