Data.Win.ADODB.TADOQuery.ExecSQL
Delphi
function ExecSQL: Integer; {for TQuery compatibility}
C++
int __fastcall ExecSQL();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.Win.ADODB.pas Data.Win.ADODB.hpp |
Data.Win.ADODB | TADOQuery |
Description
Executes the SQL statement for the ADO query.
Call ExecSQL to execute the SQL statement currently assigned to the SQL property. Use ExecSQL to execute queries that do not return a cursor to data (such as INSERT, UPDATE, DELETE, and CREATE TABLE).
ExecSQL returns an integer value reflecting the number of rows affected by the executed SQL statement.
Note: For SELECT statements, call Open instead of ExecSQL or set the Active property to true.
To speed performance, an application should ordinarily prepare the query by setting the Prepared property to true before calling ExecSQL for the first time.