Thread View: borland.public.kylix.database.sqlservers
2 messages
2 total messages
Started by Haase
Thu, 27 Mar 2003 08:18
kylix3-mysql float error
Author: Haase
Date: Thu, 27 Mar 2003 08:18
Date: Thu, 27 Mar 2003 08:18
39 lines
1972 bytes
1972 bytes
I need your help, please! I have real problems with Kylix3 prof (german edition) and a MySql database. When I try to read in a float value from the database, all decimal numbers are cut off! (this means a double becomes an integer) (the Kylix-patch k3_proenttrial_update_float_locale is installed correctly) Example: DB: MySQL-Field 'FNumber'= 123.456 : double (The MySQL Database is OK. If the values are read by MS-Access they are doubles, not integers) Kylix3: var d:double; d:=SQLDataSet1FNumber.Value; // d=123 !!! not d=123.456 !!! (BTW: The fieldeditor from SQLDataSet recognizes the field 'FNumber' as a float, which is correct. Defining d anything else then double will produce an error) the same with d:=SQLDataSet1.FieldValue['FNumber']; // d=123 !!! and NOT d=123.456 I also monitored the value d in the debugger window, it IS an integer, when read by Kylix3. So what am I doing wrong? Greetings Ingo Haase -- I.H.
Re: kylix3-mysql float error
Author: Matthias Thoma
Date: Thu, 27 Mar 2003 12:00
Date: Thu, 27 Mar 2003 12:00
16 lines
1396 bytes
1396 bytes
> I have real problems with Kylix3 prof (german edition) and a MySql database. > When I try to read in a float value from the database, all decimal numbers > are cut off! (this means a double becomes an integer) Try export LC_NUMERIC=en_US before startdelphi. Matthias Thoma -- Project JEDI - 2001 Spirit of Delphi Award Winner www.delphi-jedi.org
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads