Page 1 of 1

Float field default value problem

Posted: Tue 02 Aug 2005 04:51
by guest
I am using MyDAC 4.00.0.1 and MySQL 4.0.23-nt on WinXP.
In my database I have a table defined as following:

CREATE TABLE test (
field1 float NOT NULL default '0.5'
) TYPE=MyISAM;

The following code in C++ Builder 6.0 :

MyQuery->Options->DefaultValues = true;
MyQuery->SQL->Text = "select * from test";
MyQuery->Open();
MyQuery->Insert();

produces an exception with message:
''0.5' is not a valid floating point value for field 'field1''.

Is there any way to solve this problem without changing the system decimal separator?

Posted: Tue 02 Aug 2005 09:55
by Ikar
Thank you for information.
We reproduced your problem and fixed it. This fix will be included in the next MyDAC build.