Data.Win.ADODB.TADOCommand.Execute
Delphi
function Execute: _Recordset; overload;
function Execute(const Parameters: OleVariant): _Recordset; overload;
function Execute(var RecordsAffected: Integer; const Parameters: OleVariant): _Recordset; overload;
C++
Winapi::Adoint::_di__Recordset __fastcall Execute()/* overload */;
Winapi::Adoint::_di__Recordset __fastcall Execute(const System::OleVariant &Parameters)/* overload */;
Winapi::Adoint::_di__Recordset __fastcall Execute(int &RecordsAffected, const System::OleVariant &Parameters)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.Win.ADODB.pas Data.Win.ADODB.hpp |
Data.Win.ADODB | TADOCommand |
Description
Causes the ADO command object's command to be executed.
Call Execute to immediately execute the command specified in the CommandText property.
RecordsAffected indicates the number of records, if the command operates on data, that are affected by the command after execution.
Parameters is a collection of parameters for the command, unnecessary if the command does not use any parameters.
When a command is executed that creates a recordset, Execute returns the recordset and it must be accessed through an ADO dataset component. To do this, assign the return value of Execute directly to the recordset property of an ADO dataset component. For example:
ADODataSet1.Recordset := ADOCommand1.Execute;
ADODataSet1->Recordset = ADOCommand1->Execute();