Article View: borland.public.cppbuilder.database.ado
Article #2002TADOQuery and eoASyncFetch problem
From: Vic
Date: Wed, 10 Dec 2003 18:47
Date: Wed, 10 Dec 2003 18:47
33 lines
2289 bytes
2289 bytes
I want to use eoASyncFetch in a ADOQuery to see the progress, the problem
that I have is that when the query ends the open ( the sql command is a
SELECT ), when I print the records in a listview, the first record isn't
printed, and the number of rows in the dataset, isn't the same that the rows
printed printed in listview. Here is the code :
void __fastcall TForm1::ADOQuery1FetchComplete(TCustomADODataSet *DataSet,
const Error *Error, TEventStatus &EventStatus)
{
ListView1->Items->BeginUpdate();
ListView1->Items->Clear();
DataSet->First();
while (!DataSet->Eof )
{
TListItem *it = ListView1->Items->Add();
it->Caption = DataSet->FieldByName("TEXT1")->Value;
it->SubItems->Add(DataSet->FieldByName("TEXT2")->Value);
DataSet->Next();
}
ListView1->Items->EndUpdate();
Label1->Caption = "In Dataset " + AnsiString(DataSet->RecordCount) + ",
in List " + AnsiString(ListView1->Items->Count);
}
The caption in Label1 is : 'In Dataset 5000, in List 4999'
I think that the error is in the cachesize property ( 1 by default ), but I
can't put it to 0.
There is some way to solve it ?
--
Victor
ESPA Inform�tica.
Technical Details
Message-ID:
<3fd76a28@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!priapus.visi.com!orange.octanews.net!news.octanews.net!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,361a11b4c91b34f,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-12-10 11:09:54 PST Reply-To: "Vic" <Victor@espainformatica.com> From: "Vic" <victor@espainformatica.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: TADOQuery and eoASyncFetch problem Date: Wed, 10 Dec 2003 19:47:05 +0100 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 80.24.136.172 Message-ID: <3fd76a28@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071082024 80.24.136.172 (10 Dec 2003 10:47:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!priapus.visi.com!orange.octanews.net!news.octanews.net!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail