Datasnap.Provider.TDataSetProvider.DoBeforeExecute

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DoBeforeExecute(const CommandText: OleStr; var Params,  OwnerData: OleVariant); override;

C++

virtual void __fastcall DoBeforeExecute(const System::WideString CommandText, System::OleVariant &Params, System::OleVariant &OwnerData);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Datasnap.Provider.pas
Datasnap.Provider.hpp
Datasnap.Provider TDataSetProvider

Description

Generates a BeforeExecute event.

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

CommandText is either 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. If Options includes poAllowCommandText, DoBeforeExecute sends CommandText to the associated dataset so that it can execute the provided statement instead of its query or stored procedure.

Params contains any parameter values that should be applied to CommandText or to the query or stored procedure before execution. DoBeforeExecute assigns these parameter values to the dataset (if appropriate).

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.

See Also