RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomProvider.DoBeforeExecute Method

Generates a BeforeExecute event.

Pascal
procedure DoBeforeExecute(const CommandText: WideString; var Params: OleVariant; var OwnerData: OleVariant); virtual;
C++
virtual __fastcall DoBeforeExecute(const BSTR CommandText, OleVariant Params, OleVariant OwnerData);

The Execute method calls DoBeforeExecute to generate the BeforeExecute event before it executes CommandText or executes an associated query or stored procedure. 

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a stored procedure that replaces the associated stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText. 

Params contains any parameter values that should be applied to CommandText or to the query or stored procedure before execution. 

OwnerData supplies custom information to the BeforeExecute event handler. The event handler can change this value. The returned value is then passed to an AfterExecute event handler and then returned to the caller of the Execute method. 

As implemented in TCustomProvider, CommandText and Params are ignored. Descendant classes apply these values before generating the BeforeExecute event. 

 

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