EPUB | CHM | PDF

TMySQLBatchExecute.Events.OnBatchErrorEx

Top Previous Next

note Since v2.6.0

Extended version of OnBatchError event. OnBatchErrorEx event fires after an error occurs after execution of SQL statement from SQL script executed by ExecSQL method.

Syntax:

OnBatchErrorEx: TMySQLBatchErrorExEvent;
type
TMySQLBatchErrorExEvent = procedure(Sender : TObject;
                                         E : EMySQLDatabaseError;
                                   SQLText : String;
                               StatementNo : Integer;
                               var aAction : TMySQLBatchAction) of object;

Description:

Use this event if you want to add some custom error processing. For example to ask user if he wants to continue. You can set aAction param value to baIgnore if user's answer is YES or to baAbort otherwise.

note Take a look at Action property for possible aAction parameter values

Parameters:

Sender

Points to TMySQLBatchExecute component generated this error;

E

An instance of EmySQLDatabaseError object which contains this error info;

SQLText

Contains the text of the statement in which this error occurs;

StatementNo

The number of the SQL statement in SQL script.

aAction

Allows to override default error action defined with Action property for current statement.

See also: ExecSQL method, Action property