FireDAC.Comp.Client.TFDCustomCommand.OnError

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnError: TFDErrorEvent read FOnError write FOnError;

C++

__property Firedac::Stan::Error::TFDErrorEvent OnError = {read=FOnError, write=FOnError};

Properties

Type Visibility Source Unit Parent
event public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCustomCommand

Description

The event that fires when an error occurs, while the command is communicating with the DBMS.

The OnError event that fires, when the command executes one of the following operations and an error occurs:

  • Prepare. The command is preparing the text of the DBMS command for execution.
  • Open. The command is executing the DBMS command to open cursor.
  • Execute. The command is executing the text of the DBMS command.
  • Fetch. The command is fetching rows from the cursor.

The event handler of OnError receives the following parameters:

You can handle OnError to analyze and modify the exception object. You can even create a new exception object and assign it to AException; if you do so, you must free the original exception object.

If AException is an instance of EFDDBArrayExecuteError, then it is a case of Array DML error handling.

See Also