🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

FieldByName erroroneous result

#2506
From: Mike Knoblock
Date: Wed, 04 Jun 2003 20:08
22 lines
1574 bytes
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
Technical Details
Message-ID: <3ede51b2$1@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!newsfeed.online.be!news.tele.dk!news.tele.dk!small.news.tele.dk!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: 10698b,4d39edc0dedb6696,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-06-04 13:09:30 PST
From: "Mike Knoblock" <mjk111@adelphia.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: FieldByName erroroneous result
Date: Wed, 4 Jun 2003 16:08:50 -0400
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 68.70.202.63
Message-ID: <3ede51b2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054757298 68.70.202.63 (4 Jun 2003 13:08:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.online.be!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail