donlelel Guest
|
Posted: Tue Jul 19, 2005 2:01 pm Post subject: TClientDataSet and range |
|
|
Hi,
I'm working on a db project to convert it from using FlashFiler to
using MySql. The components I'm using to access MySql are from the
MySqlDac library.
The way things worked before :
- TClientDataSet (cds) linked to TDataSetProvider (prov) linked to
TffTable (tb)
- retrieving only the recs pertaining to a given customer was done by
something like this :
1. cds.Close;
2. ApplyRangeOnFFTable(tb,Fld_IdClient,[fIdClient],[fIdClient]);
// i.e. tb.IndexName:=aIdxName;if not tb.Active then
tb.Active:=True;tb.SetRange ...
3. cds.Open;
Now, trying the same thing with MySqlDac table component (ntb), the cds
contains all the recs from the table and not only the ones needed.
Adding the same range on the cds helps in retrieving only the good
recs, but it just takes too long. The problem is that cds.Open with ntb
just cancels the existing range on the ntb. Is there a simpler way to
just get the recs (that are already retrieved) from ntb in cds without
any more querying the MySql server? I mean, well, the ntb has new data,
have cds refresh its content from the ntb only.
Thanks,Don
|
|