Contents
Β [hide]ΒDescription
This BeforeDisconnect event handler makes sure that the client dataset has applied all its pending updates before terminating the connection to the server.
Code
procedure TForm1.RemoteServer1BeforeDisconnect(Sender: TObject);
begin
if (ClientDataSet1.ChangeCount > 0) then
ClientDataSet1.ApplyUpdates(-1);
end;