Explanation
Today I was seeing an example called FireDACJSONReflect
in the Samples folder of Delphi XE6 and I saw that it was very interesting how the server communicated with the client and I would like to use this medium in my application using TFDMemTable
to popular the data of my DBGrid
, and also saw that it was the only "direct" way to communicate with my TIWDBGrid
(IntraWeb components (IW) DBGrid component).
** My application is a server made in delphi- xe4 and a client made delphi-xe6 **
Problem
However, my application does not use delphi xe4, so I do not know how to make this communication because delphi xe4 does not have Data.FireDACJSONReflect to add in uses
so I do not have the object TFDJSONDataSets
and there is my problem ...
- How to use
TFDJSONDataSets
in Delphi XE4? - How popular is
TFDMemTable
data without usingTFDJSONDataSets
?
Some code
Here I have some lines of code that used in a delphi xe6 datasnap server would work but mine is in xe4:
function TDSSMetodoFinanceiro.getCotacaoLista : TFDJSONDataSets;
var
FDQCotacaoLista : TADQuery;
begin
Result := TFDJSONDataSets.create;
TFDJSONDataSetsWriter.listAdd(result, FDQCotacaoLista);
end;
And the question comes, why do I want my function to return a TFDJSONDataSet
?
This is because I have a TFDMemTable
in my client application in delphi xe6 and I need to populate it with data using .appendData
and this apparently needs a TFDJSONDataSet
to do this ( maybe there is another way and I would very much like to know if it exists, but so far I only know this one.)