Method DacSession():executeStatement() Professional

Executes arbitrary SQL statements.

:executeStatement( <cSqlStmt> [,@<nRowsAffected>] )
<cSqlStmt> is a character string with the SQL statement to be sent to the server. The return value of the SQL statement is ignored.
If passed by reference the parameter <nRowsAffected> receives the number of rows affected by a INSERT, UPDATE or DELETE SQL command. For all other SQL commands 0 is assigned to <nRowsAffected>.

The method returns .T. (true) when the statement is executed successfully. Otherwise .F. (false) is returned and detailed error information can be retrieved using :getLastError().


The method :executeStatement() executes arbitrary SQL statements, such as INSERT, UPDATE, DELETE or SQL DDL statements. The return value of the statement, if one exists, is ignored. In order to execute statements returning a value such as an SQL SELECT, the method :executeQuery() must be used instead.

:executeStatement() is a low level SQL support method. Use Universal SQL or the SQLStatement class instead.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.