You are not logged in.
Pages: 1
I'm migrating my datasnap application to mormot .
I have a lot of old code which I don't want to rewrite and for this i'll use mormot only for client/server via interfaces .
On the server side I work directly(without mormot) with MsSQL
on the client side I use DevExpress grid which expect TDBXReader or TclientDataset .
My question is how can I return TDBXReader or TclientDataset objects from the server
Offline
You can take a look at "17 - TClientDataset use" and "16 - Execute SQL via services".
Your interface based-service could return the data as RawJSON content (see sample 16), then on the client side, convert it into a TDataSet (see sample 17).
Offline
Thanks,
But if I have an old code returning TDBXReader , do you have a fast converter from TDBXReader to RawJSON ?
Offline
RawJSON is just some JSON content, encoded as UTF-8.
So you can certainly export your TDBXReader content into a JSON string, then use our StringToUTF8() function to get a RawJSON variable.
If you can, convert your old code from TDBXReader into native SynDB units.
They are able to return directly UTF-8 JSON, ready to be server for your clients.
I suspect you will have huge performance increase, and much lower resource use.
See http://synopse.info/forum/viewtopic.php?pid=6363#p6363
Just make it a try, and also with multiple threads if you can.
Offline
Thanks,
I will try to migrate my TDBXReader usage to SynDB units .
As I understand TSQLDBConnectionProperties.ExecuteInlined is thread safe and I need only one instance of TSQLDBConnectionProperties on the server side . Am I right ?
Last edited by nirnir (2013-11-20 09:32:50)
Offline
Pages: 1