BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

fetch problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Pekka Paunio
Guest





PostPosted: Thu Oct 05, 2006 3:59 pm    Post subject: fetch problem Reply with quote



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





PostPosted: Fri Oct 06, 2006 7:16 pm    Post subject: Re: fetch problem Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.