🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Accessing Query result ("SELECT count(*) ...")

#5670
From: Sandi Wijaya
Date: Wed, 07 Mar 2001 02:44
15 lines
1322 bytes
Hi, everyone

I want to ask, about accessing the result of SQL statement in Query object.
SQL statement is :
"SELECT count(*) FROM pub.trade_acct"

the result should be an integer in to a one record and one field, right. I
tried to access with :
AnsiString x = DM_MaintChqType->Q_tradeacct->Fields->Fields[0]->AsString;

but it's returning an exception error message that said "list is out of
bound".

How can I access the result ?
Thank you in advance.
Technical Details
Message-ID: <3aa5a085_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!202.158.57.91

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e643ec471dc993e1,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-03-06 18:50:08 PST
From: "Sandi Wijaya" <sandiwijaya@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Accessing Query result ("SELECT count(*) ...")
Date: Wed, 7 Mar 2001 09:44:07 +0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 202.158.57.91
Message-ID: <3aa5a085_1@dnews>
X-Trace: 6 Mar 2001 18:44:21 -0800, 202.158.57.91
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!202.158.57.91