Or like this:
procedure TForm1.Button1Click(Sender: TObject);
begin
with IBClientDataSet1 do
begin
fetchondemand := False; // Make sure we do the fetching
ourself
open;
while GetNextPacket > 0 do // Get packages
while not eof do
begin
// Processing
label1.Caption := fieldbyname('cDescription').Value;
label1.Update;
next;
end;
end;
close;
if IBDatabase1.DefaultTransaction.InTransaction then
IBDatabase1.DefaultTransaction.Rollback;
IBDatabase1.Close;
end;
-----Oorspronkelijk bericht-----
Van: [email protected] [mailto:[email protected]]
Namens SoftTech
Verzonden: maandag 27 september 2010 16:54
Aan: Delphi - Database
Onderwerp: Using PacketRecords on a TClientDataset
Greetings All,
Delphi 5.1
Still using Firebird 1.5.3
I have a SQL that wants to fetch 200000+ records for a certain date
range.
So to limit the number of records pulled back to the interface I set the
TClientDataset PacketRecords to 1000. Which works great as it instantly
pulls the information back to the interface and starts processing the
data
in a while loop as follows.
while not EOF do
begin
...
next;
end;
My problem is that it only processes this for the first 1000 and then
exits
the loop, I thought that it should continue to pull the next 1000 until
there is no more data that meets the criteria.
Any idea what I might be doing wrong?
Any help appreciated.
Mike
_______________________________________________
Delphi-DB mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db
Paul van Mil
Senior Developer
MAD-Systems
Burg. van Suchtelenstr. 26
6641 XN Beuningen (Gld)
The Netherlands
Url: www.madsystems.nl
Tel.: +31 (0)24-366 1501
Fax.: +31 (0)24-366 1502
Mob.: +31 (0)6 2251 4084
Email: [email protected]
*************************************************************************
Disclaimer: MAD-Systems is de enige opdrachtnemer van alle werkzaamheden.
Nederlands recht is van toepassing. De aansprakelijkheid van MAD-Systems is
beperkt tot de uitkering die plaatsvindt onder de verzekering van MAD-Systems
tegen beroepsaansprakelijkheid.
Disclaimer: MAD-Systems is the exclusive contractual party with respect to all
work and services undertaken.
Dutch laws shall apply. The aggregate liability of MAD-Systems shall be limited
to the proceeds available under MAD-Systems professional liability insurance.
This e-mail message is intended exclusively for the addressee(s). If the e-mail
was sent to you by mistake, would you please contact us immediately by e-mail
through "[email protected]".
In that case, we also request that you destroy the e-mail and that you neither
use the contents nor disclose them in any manner to third parties, because the
message may contain confidential information which is protected by professional
secrecy.
Any addressee should be aware that internet e-mail is subject to risks;
MAD-Systems therefore denies any responsibility for damages resulting from the
use of Internet e-mail.
*************************************************************************
This email is checked on viruses through Norton Antivirus, updated
10-09-2010
_______________________________________________
Delphi-DB mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db