Skip to content

TDataSetErrorEvent

Error handling callback.

Declaration

Source position: db.pas line 1607

type
  TDataSetErrorEvent = procedure(DataSet: TDataSet; E: EDatabaseError; 
                               var DataAction: TDataAction) of object;

Arguments

Name Description
DataSet Dataset that triggered the event.
E Exception object that caused the operation to fail.
DataAction Action to take upon return of the event handler.

Description

TDatasetErrorEvent is used by the TDataset.OnEditError, TDataset.OnPostError and TDataset.OnDeleteError event handlers to allow the programmer to specify what should be done if an update operation fails with an exception: The Dataset parameter indicates what dataset triggered the event, the E parameter contains the exception object. The DataAction must be set by the event handler, and based on it's return value, the dataset instance will take appropriate action. The default value is daFail, i.e. the exception will be raised again. For a list of available return values, see TDataAction.

See also

Name Description
TDataAction Action to take when a data manipulation operation has failed.