[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'DB' (#fcl)

# TDataSetErrorEvent

Error handling callback

## Declaration

Source position: db.pas line 1385

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

## Arguments

`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

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

Documentation generated on: May 14 2021