Connect client firedac to server and show data in dbgrid on client datasnap delphi

151 Views Asked by At

How can I show data from a server in Delphi's TDBGrid on a client using Firedac and DataSnap?

2

There are 2 best solutions below

0
Error In Code On

You can do this with a TFDTable. On the detail dataset, set the Master Source property to the master TFDTable and the Master Fields property to your master field in the master TFDTable. Also see This Link on master - detail relationships.

Edit: I am terribly sorry I missed the DataSnap part. This is for FireDac.

0
gusgus On

I have on the Datasnap server a TFDQuery that is exposed through a public method

function GetOrder(AId: Integer): TDataSet;.

On the client, there is a TFStoreProc that binds the Datasnap server method (GetOrder) in the StoredProcName property.

Finally, a TDatasource is attached to the TFDStoreProc and the TDatasource is attached to the DBGrid.