Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Incremental fetching
Incremental fetching
Posted: 2008/04/08 01:17
 
Hi!

We have a huge table (>100.000 records). We want implement an "incremental fetching" with TADClientdataset: that means we want to load gradually the demanded part of the table.

For example: first load only the records beginning with records where PK like "B" and so on, next with records where PK like "X" enlarge the TADClientdataset etc

Can we realize that?

kla
Re:Incremental fetching
Posted: 2008/04/08 06:11
 
Hello

I have prepared small demo. See, what I am doing in TForm30.FormCreate.

Regards,
Dmitry
File Attachment:
File name: Demo.zip
File size:1590 bytes
Re:Incremental fetching
Posted: 2008/04/08 09:40
 
Thank You!

It works fine!

Best regards
kla
Re:Incremental fetching
Posted: 2008/04/09 05:46
 
Hi!

I have one more question:

Wenn I try to rewrite the select statement in 2. fetch (instead of parameter), then at append a message comes: "402 - Operation cannot be performed without assigned Selectcommand"

Your example:
ADCommand1.Close;
ADCommand1.Params[0].AsInteger := 2;
ADCommand1.Open;

My example:
ADCommand1.Close;
ADCommand1.Commadtext[0] := ''select * from Orders where EmployeeID = 2'

Regards
kla
Re:Incremental fetching
Posted: 2008/04/09 07:51
 
Hello

I am sorry, but this is a bug in v 1.12. It is long time ago fixed in v 2.

Regards,
Dmitry
Re:Incremental fetching
Posted: 2008/04/09 10:20
 
Hi!

Unfortunatly with AnyDAC 2 comes these error too. Changes in Your example:

...
ADCommand1.Close;
//ADCommand1.Params[0].AsInteger := 3;
ADCommand1.Commandtext[0] := 'select * from Orders where EmployeeID = 3';
ADCommand1.Open;
ADCommand1.Fetch(ADMemTable1.Table, True);

ADMemTable1.append; // <- here comes Err 402

regards
kla
Re:Incremental fetching
Posted: 2008/04/09 10:37
 
On 2.0.1.285 it works perfect. I have tested few more variations of the code and it works too.