How I can send the Changes of a TClientDataset back to a RTC Server?

222 Views Asked by At

hi I have a Server/ Client Application in Delphi with RTC. My Client is a Android Mobil Device and that have a TGrid. The Server get the data from a dbf File and send this Data as a Dataset to the client with HTTP. The Client get the Data and fill the TGrid and this works but if I want to send the changes Data back it doesn#t work :(

Here my Code:

procedure TForm3.RtcDataSetMonitor1DataChange(Sender: TObject);
var
  data: TRtcDataSet;
  ChangeDataset : TClientDataSet;
begin

    data := TRtcDataSet.Create;

    ChangeDataset.CreateDataSet;

    ChangeDataset :=  data.asDataSet;

    DelphiDataSetToRtc(ChangeDataset,data);
    RtcClientModule.Prepare('submit');
    RtcClientModule.Param.asObject['change_data'] := data;
    RtcClientModule.Call(RtcResultArtikel);

end;

delphi say me that data is not initialize

...

The Grid get data from GetDataSet and I want to send only the changes back! GetDataset is gloabal.

0

There are 0 best solutions below