🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4771

ADO returning truncated values

#4771
From: Graham Reeds
Date: Thu, 18 Oct 2001 12:38
32 lines
1957 bytes
I've got an Oracle database which I am querying for values.  These values
are 9 decimal places in length, and are stored in Oracle as such.  If I
perform the same query from within SQL*Plus I get the correct results
displayed.  However when I retrieve these values from the database they are
rounded to four decimal places.  I have tried using various methods to get
back the correct values including FormatFloat(,); which just appends more
zeros to the value.

Does anyone have any ideas?

Code below:
...
fprintf(fp, "%s,", FormatFloat("#0.000000000",
ADOQuery->FieldByName("LONGITUDE")->AsFloat));
fprintf(fp, "%s,", FormatFloat("#0.000000000",
ADOQuery->FieldByName("LATITUDE")->AsFloat));
fprintf(fp, "%s\n", FormatFloat("#0.000000000",
ADOQuery->FieldByName("HEIGHT")->AsFloat));
ADOQuery->Next();
...

Returned values:
-2.467600000,53.700100000,217.714000000
Should return:
-2.467589257,53.70012166,217.714
Oracle displays:
-2.4675893 53.7001217    217.714

--

Yours faithfully, Graham Reeds.
grahamr@omnieng.co.uk | http://omnieng.co.uk/
Technical Details
Message-ID: <3bcecd33$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,1aec9b0e3c098bb,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-10-18 05:39:11 PST
From: "Graham Reeds" <grahamr@omnieng.co.uk>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADO returning truncated values
Date: Thu, 18 Oct 2001 13:38:07 +0100
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 212.172.148.2
Message-ID: <3bcecd33$1_1@dnews>
X-Trace: dnews 1003408691 212.172.148.2 (18 Oct 2001 05:38:11 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews