Delphi Datasnap: How to manually build dataset when using a TDatasetProvider

391 views Asked by At

I would like to manually build the dataset used by a TDatasetProvider to return the data to the client.

The SQL request is taking a long time to run as a query and I am trying to speed up things by splitting the logic in code and using a kbmMemtable to hold my data before returning it to the client.

Can I do this:

kbmMemtable -> TDatasetProvider -> TClientDataset

If this can be done, in what event of my TDatasetProvider should I set the data in the memtable ?

Using Delphi XE

1

There are 1 answers

0
Vladimir Ulchenko On

you could do it in BeforeGetRecords/OnGetData event handler or even elsewhere