RAD Studio VCL Reference
TADOConnection.OnWillExecute Event

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

property OnWillExecute: TWillExecuteEvent;
__property TWillExecuteEvent OnWillExecute;

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. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!