Article View: borland.public.cppbuilder.database.ado
Article #515Re: How to retrieve data from an ADO query
From: Vladimir Stefanovic
Date: Tue, 30 Aug 2005 13:55
Date: Tue, 30 Aug 2005 13:55
41 lines
2218 bytes
2218 bytes
Something like this /UNTESTED!!!/
ADOQuery1->Open();
for ( int i=0; i<ADOQuery1->RecordCount; i++ )
{
AnsiString ROW = ADOQuery1->FieldValues["Field1"] + ", " +
ADOQuery1->FieldValues["Field2"];
SomeStringList->Add( ROW );
ADOQuery1->Next();
}
--
Best regards,
Vladimir Stefanovic
"George Nakos" <gnakos@metronco.gr> wrote in message
news:op.swbnqgj9qf2fxd@promitheas.metron.internal...
Greetings,
I know that this topic should tire you as I suspect that it has been
answered a lot of times, but the answers I read didn't cover my needs.
My situation is this: I am using a TADOQuery to do some SQL queries to an
MS Access database. This works fine, and I can even put the results in a
dataset and display them using TDBText objects on screen.
My problem is that I don't want to display the data on screen, just store
them in arrays and use them whenever necessary.
If someone could provide a step-by-step process on how to do this, and
providing a few lines of sample code, I would be most grateful.
Thanks,
George Nakos
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Technical Details
Message-ID:
<4314651e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!213.239.142.2.MISMATCH!feeder.xsnews.nl!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<op.swbnqgj9qf2fxd@promitheas.metron.internal>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,8fb1b60fd2dcc362 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Newsgroups: borland.public.cppbuilder.database.ado References: <op.swbnqgj9qf2fxd@promitheas.metron.internal> Subject: Re: How to retrieve data from an ADO query Date: Tue, 30 Aug 2005 15:55:20 +0200 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 82.117.212.65 Message-ID: <4314651e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1125410078 82.117.212.65 (30 Aug 2005 06:54:38 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!213.239.142.2.MISMATCH!feeder.xsnews.nl!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail