Method DacSession():executeStatement() Professional

Executes arbitrary SQL statements.

Syntax
:executeStatement( <cSqlStmt> [,@<nRowsAffected>] )
Parameters
<cSqlStmt>
<cSqlStmt> is a character string with the SQL statement to be sent to the server. The return value of the SQL statement is ignored.
<nRowsAffected>
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>.
Return

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().

Description

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.

Feedback

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.