🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.kylix.database.sqlservers
Article #151

kylix3-mysql float error

#151
From: Haase
Date: Thu, 27 Mar 2003 08:18
39 lines
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.
Technical Details
Message-ID: <3e82b352@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa73d,a13087abe093a932,start
X-Google-Attributes: gidfa73d,public
X-Google-ArrivalTime: 2003-03-27 00:40:04 PST
Message-ID: <3e82b352@newsgroups.borland.com>
From: Haase <luggels@freenet.de>
Subject: kylix3-mysql float error
Newsgroups: borland.public.kylix.database.sqlservers
Reply-To: luggels@freenet.de
Date: Thu, 27 Mar 2003 09:18:04 +0100
Lines: 39
User-Agent: KNode/0.7.1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 213.7.189.20
X-Trace: newsgroups.borland.com 1048752979 213.7.189.20 (27 Mar 2003 00:16:19 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail