TsgcWSPClient_DatasetEvents › OnAfterNewRecord

OnAfterNewRecord Event

Fires after a new record received from the server has been inserted in the local Dataset.

Syntax

property OnAfterNewRecord: TsgcWSAfterRecordEvent;
// TsgcWSAfterRecordEvent = procedure(Connection: TsgcWSConnection; const Dataset: TDataset) of object

Default Value

Remarks

Raised once the component has successfully inserted and posted the incoming record to the attached Dataset. Use it to refresh the UI, log the change or trigger dependent calculations. The Dataset parameter refers to the same instance assigned to the DataSet property.

Example

procedure TForm1.oProtocolAfterNewRecord(Connection: TsgcWSConnection;
  const Dataset: TDataset);
begin
  Memo1.Lines.Add('record inserted: ' + Dataset.Fields[0].AsString);
end;

Back to Events