 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Pekka Paunio Guest
|
Posted: Thu Oct 05, 2006 3:59 pm Post subject: fetch problem |
|
|
Hi,
I'm fetching a view of 22375 records with following routine:
##########################################33
i_f := 500;
i_n := 0;
DataModule1.cdsCub1.FetchOnDemand := true;
DataModule1.cdsCub1.PacketRecords := i_f;
DataModule1.cdsCub1.Open;
while DataModule1.cdsCub1.GetNextPacket > 0 do
begin
i_n := i_n + 1;
//Label3.Caption := IntToStr(i_n*i_f);
showmessage('Fetched: ' + IntToStr(i_n*i_f) +' rows') // for debug
purposis
end;
##########################################
Problem is that the GetNextPacket freezes after 22 000 fetches.
The same query works well in EMS (thats how i got the total number of rows:
22375).
It also freezes when FetchOnDemand is true.
The same query works well in EMS (thats how i got the total number of rows:
22375).
Any ideas?
Pekka |
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Fri Oct 06, 2006 7:16 pm Post subject: Re: fetch problem |
|
|
Pekka Paunio wrote:
| Quote: | DataModule1.cdsCub1.FetchOnDemand := true;
DataModule1.cdsCub1.PacketRecords := i_f;
DataModule1.cdsCub1.Open;
while DataModule1.cdsCub1.GetNextPacket > 0 do
|
It doesn't make any sense to combine FetchOnDemand = True and
GetNextPacket.
Anyway, I suspect you're getting all the rows. Fetch until there are
no more, then check the CDS.RecordCount.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
http://qc.borland.com -- Vote for important issues |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|