Datasnap.Win.MtsRdm.TMtsDataModule.AS_Execute

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AS_Execute(const ProviderName: WideString;  const CommandText: WideString; var Params, OwnerData: OleVariant); safecall;

C++

HIDESBASE HRESULT __safecall AS_Execute(const System::WideString ProviderName, const System::WideString CommandText, System::OleVariant &Params, System::OleVariant &OwnerData);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Datasnap.Win.MtsRdm.pas
Datasnap.Win.MtsRdm.hpp
Datasnap.Win.MtsRdm TMtsDataModule

Description

Executes the query or stored procedure bound to a specified provider.

Datasnap.Win.MtsRdm.TMtsDataModule.AS Execute inherits from Datasnap.DataBkr.TRemoteDataModule.AS_Execute. All content below this line refers to Datasnap.DataBkr.TRemoteDataModule.AS_Execute.

Executes the query or stored procedure bound to a specified provider.

Use AS_Execute to pass an execute command to a remote provider, using a specified set of parameters. AS_Execute calls the AS_Execute method of the specified provider after assigning any parameters. Output parameters that result from executing a query or stored procedure are returned in the Params parameter.

Note: AS_Execute should only be called for a provider whose dataset represents a query or stored procedure that does not return a cursor.

The ProviderName parameter specifies the name of the provider component associated with the query or stored procedure.

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

The Params parameter encodes any parameters expected by the query or stored procedure and returns any output parameters. To create a properly encoded value for Params from a TParams object, use the PackageParams method.

The OwnerData parameter contains custom information that appears as an argument to the provider's BeforeExecute and AfterExecute event handlers. This information originates in a client dataset's BeforeExecute event handler. The value returned in OwnerData is passed to the client dataset's AfterExecute event handler.

Note: Applications can only call the protected AS_Execute method using the TRemoteDataModule interface. To execute a dataset in code from the application server, use the dataset component directly.

See Also