FireDAC.Comp.Client.TFDAdaptedDataSet.PSExecuteStatement

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PSExecuteStatement(const ASQL: string; AParams: TParams;  AResultSet: Pointer): Integer; overload; {$IFNDEF NEXTGEN} override; {$ENDIF}
function PSExecuteStatement(const ASQL: string; AParams: TParams;  var AResultSet: TDataSet): Integer; overload; override;
function PSExecuteStatement(const ASQL: string;  AParams: TParams): Integer; overload; override;

C++

virtual int __fastcall PSExecuteStatement(const System::UnicodeString ASQL, Data::Db::TParams* AParams, void * AResultSet)/* overload */;
virtual int __fastcall PSExecuteStatement(const System::UnicodeString ASQL, Data::Db::TParams* AParams, Data::Db::TDataSet* &AResultSet)/* overload */;
virtual int __fastcall PSExecuteStatement(const System::UnicodeString ASQL, Data::Db::TParams* AParams)/* overload */;

Properties

Type Visibility Source Unit Parent
function protected
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDAdaptedDataSet

Description

Executes a specified SQL command.

FireDAC.Comp.Client.TFDAdaptedDataSet.PSExecuteStatement inherits from Data.DB.TDataSet.PSExecuteStatement. All content below this line refers to Data.DB.TDataSet.PSExecuteStatement.

Executes a specified SQL command.

If the value of ResolveToDataSet property is False, a provider component calls PSExecuteStatement (indirectly) to execute SQL statements that it generates for applying updates. Usually, the dataset passes these statements on to its database server for execution.

The ASQL parameter specifies the SQL command to execute.

AParams contains any parameter values that should be applied to ASQL before execution.

ResultSet allows PSExecuteStatement to return a dataset component that contains the results of a SELECT statement. If ResultSet is not nil (Delphi) or NULL (C++), PSExecuteStatement creates a new dataset component as the target of this pointer and fills it with the result set. The caller is responsible for freeing the dataset.

This method is an implementation of IProviderSupport.PSExecuteStatement and, by default, returns 0. To use it, every TDataSet descendant must override it in its specific way.

PSExecuteStatement returns the number of rows affected by executing ASQL.

See Also