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

TDataSet.OnPostError

Event triggered when a post operation fails.

Declaration

Source position: db.pas line 1382

public property TDataSet.OnPostError: TDataSetErrorEvent
  read FOnPostError
  write FOnPostError;

Description

OnPostError is triggered when the TDataset.Post method fails to post the changes in the dataset buffer to the underlying database, because the database engine reported an error. The event handler can be used to indicate what the response to the failed post operation should be. To this end, it gets the exception object passed to it (parameter E), and it can examine this object to return an appropriate action in the DataAction parameter. The following responses are supported:

daFail
The operation should fail (an exception will be raised)
daAbort
The operation should be aborted (edits are undone, and an EAbort exception is raised)
daRetry
Retry the operation.

For more information, see also the description of the TDatasetErrorEvent event handler type.

See also

TDatasetErrorEvent

  

Error handling callback

TDataset.Post

  

Post pending edits to the database.

TDataset.OnDeleteError

  

Event triggered when a delete operation fails.

TDataset.OnEditError

  

Event triggered when an edit operation fails.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.