RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWideDataSet.PSExecuteStatement Method (string, TParams, Pointer)

Executes a specified SQL command.

Pascal
function PSExecuteStatement(const ASQL: string; AParams: TParams; ResultSet: Pointer = nil): Integer; override; overload;
C++
virtual __fastcall int PSExecuteStatement(const AnsiString ASQL, TParams AParams, void * ResultSet = nil);

If the value its 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. 

PSExecuteStatement returns the number of rows affected by executing ASQL. 

 

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