Article View: borland.public.cppbuilder.database.ado
Article #111FieldByName() throws exception
From: Mike K
Date: Thu, 30 Aug 2007 14:49
Date: Thu, 30 Aug 2007 14:49
20 lines
1219 bytes
1219 bytes
int device;
// this code works:
device = ADODataset1->Fields->Fields[7]->AsInteger;
// this does not:
device = ADODataset1->Fields->FieldByName("Device")->AsInteger;
This throws this exception:
" is not a valid floating point value.
I remember having this problem before, and worked around it by using the
more cryptic Fields->Fields[] method, but this is driving me nuts.
Anyone know what is wrong here?
TIA
Mike
Technical Details
Message-ID:
<46d6d913$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,a7a7c8887b6e7f5b,start X-Google-Attributes: gid10698b,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 30 Aug 2007 09:49:57 -0500 From: Mike K <nospam@nospam.net> User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: FieldByName() throws exception Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 74.38.225.211 Message-ID: <46d6d913$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1188485395 74.38.225.211 (30 Aug 2007 07:49:55 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail