Data.Win.ADODB.TADOConnection.OnWillExecute

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnWillExecute: TWillExecuteEvent read FOnWillExecute write FOnWillExecute;

C++

__property TWillExecuteEvent OnWillExecute = {read=FOnWillExecute, write=FOnWillExecute};

Properties

Type Visibility Source Unit Parent
event published
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TADOConnection

Description

Occurs after a database server signals acceptance of a command execution.

Write an OnWillExecute event handler to take specific action before a command is executed. The OnWillExecute event fires after the corresponding operation (requesting a command execution) has executed at the ADO Connection object. Calling the Execute method will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. In a handler for this event, set this parameter to esCancel to request cancellation of the pending command execution.

See Also