Occurs when an application attempts to modify or insert a record and an exception is raised.
type TDataSetErrorEvent = procedure(DataSet: TDataSet;
var Action: TDataAction) of object;
property OnPostError: TDataSetErrorEvent;
Write an OnPostError event handler to handle exceptions that occur when an attempt to post
a record fails.
DataSet is the dataset that failed to post a record. E is a pointer to the database
error object that contains the exception error message so that an application can display an error
message. Action indicates how the dataset should respond to the error.
When OnPostError is first invoked, Action is always set to daFail. If the
error handler can correct the error condition that caused the handler to be invoked, set Action
to daRetry before exiting the handler. When Action is daRetry, the post operation is
tried again. If an error condition cannot be corrected, the display of the error message can be
suppressed, if desired, by setting Action to daAbort instead of daFail.