Article View: borland.public.cppbuilder.database.ado
Article #4187Re: how can I get compute field value from ADO client?
From: Lee Gan
Date: Thu, 14 Mar 2002 18:06
Date: Thu, 14 Mar 2002 18:06
23 lines
1531 bytes
1531 bytes
One example is:
ADOQuery->SQL->Add("SELECT SUM(Fiels1) AS Field1, COUNT(Field2) AS Field2
FROM Table WHERE Dates BETWEEN #Date1# AND #Date2# GROUP BY Field1");
Then retrive the values like this:
x = ADOQuery->FieldByName("Field1")->Value;
Hope the above helps. Lee Gan
"Junlin Xie" <jlxie@yahoo.com> wrote in message news:3c9069e9_1@dnews...
> Hi,
> I want to get a summary information using SELECT statement with
COMPUTE
> clause, but after execute SQL statement, I have no idea to find the
compute
> field from ADO client, how can I get compute field value? Thank you!
>
>
> Junlin Xie.
>
>
Technical Details
Message-ID:
<3c90e69a$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.cs.utwente.nl!newshunter!cosy.sbg.ac.at!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnewsReferences:
<3c9069e9_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,238de2d6450cb5fb X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-03-14 10:08:02 PST From: "Lee Gan" <leegan@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3c9069e9_1@dnews> Subject: Re: how can I get compute field value from ADO client? Date: Thu, 14 Mar 2002 11:06:18 -0700 Lines: 25 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: 207.34.102.197 Message-ID: <3c90e69a$1_1@dnews> X-Trace: dnews 1016129178 207.34.102.197 (14 Mar 2002 10:06:18 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.cs.utwente.nl!newshunter!cosy.sbg.ac.at!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews