How to use Tfdjsondatasets in Delphi XE4?

Asked

Viewed 2,075 times

4

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 carry out communication with my TIWDBGrid(Dbgrid component of the Intraweb components (IW)).

** My application is a server made in and a customer made in **

Problem

However, my application does not use Delphi xe4, so I don’t know how to make this communication because Delphi xe4 does not have Data.Firedacjsonreflect to add to uses so I don’t have the object TFDJSONDataSets and there’s my problem...

  • Can you use the TFDJSONDataSets in Delphi XE4?
  • It has as popular the data of the TFDMemTable without the use of TFDJSONDataSets?

Some code

Here I have some lines of code that used in a server datasnap Delphi xe6 would work but mine is in xe4:

function TDSSMetodoFinanceiro.getCotacaoLista : TFDJSONDataSets;
var 
  FDQCotacaoLista : TADQuery;
begin
  Result := TFDJSONDataSets.create;
  TFDJSONDataSetsWriter.listAdd(result, FDQCotacaoLista);
end;

And here comes the question, because I want my job to return a TFDJSONDataSet?

That’s because I have one TFDMemTable in my client application in Delphi xe6 and I need to popular it with data using .appendData and this apparently needs a TFDJSONDataSet to do this (maybe there is another way and I would love to know if there is, but so far only this).

  • Dude, I did a little research and I talked to some people who know Delphi and, from what I understand, you can only do this from XE5 onwards

  • It is, only that I would like an alternative solution to carry out direct communication between my xe6 application and my xe4 server

  • Upgrading your datasnap to XE5 onwards would solve... what’s a great thing...

  • The problem is that I really can’t do this @Daniloloko

  • Will no one answer? 150 reputation points will expire...

  • @Bacco is right, unfortunately nobody found anything so at least you brought an existing content to ca(soen’s reply)

  • @Pauloroberto you still have this problem to solve, or solved otherwise?

  • resolve otherwise I resolved however I would like to do the way I asked above...

  • 2

    @Pauloroberto as the minimum is 100 to power for a Bounty of mine in this, I will think of a plan B for you not to lose all investment.

Show 4 more comments

1 answer

4

Tfdjsondatasets was introduced in XE6, unfortunately there is no way to use in XE4. maybe the path is an Fdmemtable instead.

There is a tutorial XE5 that might suit XE4.

Here’s a example using ClientDataset, try and see if it fits.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.