🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: FieldByName erroroneous result

#2511
From: Arnie Mauer
Date: Mon, 09 Jun 2003 12:33
30 lines
1931 bytes
"Mike Knoblock" <mjk111@adelphia.net> wrote in message
news:3ede51b2$1@newsgroups.borland.com...
> I don't know if anyone has run  into this, but I encountered a problem
when
> retrieving a value of type double from a dataset using FieldByName as
> follows:
>
> TADOQuery * AQ;
> ...
> double addr;
> ....
> addr = AQ->Fields->Fields[0]->AsFloat;
> // returned 125013010 - the correct value
> addr = AQ->Fields->FieldByName("office_address")->AsFloat;     // returned
> 125013008 !!!
>
> Casting the FieldByName call to return a double did not change the result;
> in fact the BCB help says this function only returns a double.  Am I not
> using this function correctly, or is it a known problem?
>
> Using BCB5 with ADO Express.
>
> TIA
>
> Mike
>
>
I tried this against a DB2 DB using your number and get the same result both
ways.  I'm also using BCB5 with ADO Express.
- Arnie
Technical Details
Message-ID: <3ee47e7b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!feedwest.aleron.net!aleron.net!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ede51b2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,4d39edc0dedb6696
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-06-09 05:35:22 PST
From: "Arnie Mauer" <arnie@earthlink.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3ede51b2$1@newsgroups.borland.com>
Subject: Re: FieldByName erroroneous result
Date: Mon, 9 Jun 2003 08:33:23 -0400
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 209.140.211.97
Message-ID: <3ee47e7b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1055161979 209.140.211.97 (9 Jun 2003 05:32:59 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!feedwest.aleron.net!aleron.net!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail