I did not find documentation and no sample, so I would appreciate some assistance.
For testing purposes I created a simple form, added a TWebClientDataSet and inserted some records. In the real app, data comes from a REST service , gets edited and should be written back. So I need access to the changes.
This is what I tried:
procedure TForm2.btnInsertClick(Sender: TObject);
var
n: Integer;
begin
n := cdsData.RecordCount + 1;
cdsData.InsertRecord([n, 'zeile1']);
end;
procedure TForm2.btnGetUpdatesClick(Sender: TObject);
var
i: Integer;
resArray: TResolveinfoArray;
s: string;
Info: PTypeInfo;
begin
Info := System.TypeInfo(TUpdateStatus);
resArray := cdsData.GetPendingUpdates;
for i := 0 to High(resArray) - 1 do begin
s:='';
s:=s+'Status '+GetEnumName(Info,ord(resArray[i].Status));
// log all data here
ShowMessage(s);
end;
end;
However, PendingUpdates is nil. Looking at the source:
function TWebCustomClientDataSet.GetPendingUpdates: TResolveInfoArray;
begin
Result := nil;
end;
So, I think I am missing something basically here.
BTW: TJSValue - how do I access these values or how to comvert this?
Thanks a lot!
Bernd