TsgcWSPServer_DatasetEvents › OnAfterDeleteRecord

OnAfterDeleteRecord Event

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

Syntax

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

Default Value

Remarks

Raised once the incoming delete has been applied to the DataSet and the removal is broadcast to peer clients on the delete channel. When the event runs the deleted row is no longer current, so capture any required field values before the delete by handling OnBeforeDeleteRecord. Use this hook for audit logging or to trigger compensating actions.

Example

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

Back to Events