#1 2016-05-02 20:59:44

HollosCs
Member
Registered: 2015-12-08
Posts: 56

ToClientDataSet/ToDataSet

Hi!
When I get data from legacy SQLite db with ToClientDataSet/ToDataSet:
can I convert or compute same data for TClientDataset? (field name not equal or compund field only in TClientDataset)?

Thx, Csaba

Offline

#2 2016-05-03 07:25:32

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: ToClientDataSet/ToDataSet

Hi!

Clear it a little my problem.
I want to use mORMot in my development process. First step using mORMot to data retrieve from an legacy SQLite3 database.
UI client using dbgrid with TClientDataset (all client write in Delphi)

-Connect to database: OK
-Use SQL select to data retrieve: OK
-What is the fastest way to convert retrieved data to existing TClinetDataSet, during the conversion I nedd to field mapping and field computing?

Csaba

Offline

#3 2016-05-03 10:48:53

sevo
Member
Registered: 2015-11-10
Posts: 27

Re: ToClientDataSet/ToDataSet

I would try using Field-Aliases, e.g. "select table1.field1 as localfield ..." and calculate the field-values in OnCalcFields-Event of the existing client-dataset.
Maybe OnCalcFields is not trigged when loading with ToClientDataset.

Offline

Board footer

Powered by FluxBB