RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOQuery.ExecSQL Method

Executes the SQL statement for the ADO query.

Pascal
function ExecSQL: Integer;
C++
__fastcall int ExecSQL();

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. 

 

SQL 

Parameters 

SQL 

Active 

Open 

Prepared 

ParamByName

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!