TsgcWSPServer_DatasetEvents › OnAfterNewRecord

OnAfterNewRecord Event

Fires after the server successfully inserts a client-originated record.

Syntax

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

Default Value

Remarks

Raised once the incoming insert has been posted to the DataSet and the row is broadcast to peer clients on the internal update channel. Dataset is positioned on the newly inserted row. Use this hook to audit, log or trigger follow-up work after a remote insert has been committed on the server side.

Example

procedure TForm1.oProtocolAfterNewRecord(Connection: TsgcWSConnection;
  const Dataset: TDataset);
begin
  Memo1.Lines.Add('inserted by ' + Connection.Guid);
end;

Back to Events