#1 2019-03-30 20:13:00

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

rest to dataset

Hello!

I have a TSQLRestServerFullMemory.
Create TSQLRestClientURIDll client and get tale data with and get table data with client.List() or client.RetrieveListJSON().
Program is working, BUT how can I convert retrieved data for DataSource.Dataset?

Thx, Csaba

Offline

#2 2019-03-31 09:12:20

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: rest to dataset

Please full text search into the mORMot library path for the various forms of the 'ToDataSet' function scattered around several units.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#3 2019-03-31 09:36:38

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

Re: rest to dataset

The problem is ToDataset(), BinaryToDataSet() convert from rawbytestring or ISQLDBRows, not from List and from json.
I use TSQLRestClient. List(), RetrieveList(), because i have TSQLRestServerFullMemory base server, not http connection or pure sql command.

Offline

#4 2019-03-31 13:11:16

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: rest to dataset

Oops...
I myself use ToClientDataSet() to convert from TSQLTableJSON to TClientDataSet.

You can also check TSynSQLTableDataSet and \SQLite3\Samples\ThirdPartyDemos\EMartin\TSynRestDataset\SynRestVCL.pas to see which suites your needs.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB