Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
TDataSet.OnPostError
TDataSet
Top 


Occurs when an application attempts to modify or insert a record and an exception is raised.

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

Description
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.
        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 21, 2024