Function DacSqlStatement() Professional

Returns a spezialized SQL statement class object

Syntax
DacSqlStatement( [<oSession>|<cSession>] ) -> oSqlStatement
Parameters
<oSession>
An instance of DacSession() or a derived class. The session must be in a connected state. Otherwise, a runtime error is generated.
<cSession>
The name of a connected session. Use "global.memory" to select the global session of the embedded SQLite engine.
Return

The function returns the class object of a SQL statement class derived from SqlStatement.

Description

The function DacSqlStatement() returns a specialized SQL statement class object suitable for use with the connection passed.

The class object returned is typically used in conjunction with the :fromChar() method for creating a SQL statement that is first built using :build(), and then executed with the :execute() or :query() method.

If the parameter <oSession> is not passed, DacSqlStatement() uses the default session of the current thread. If there is no default session, a SQL statement object suitable for use with the embedded SQLite engine and its in-memory database is returned.

Passing a session name allows to select the session object by name. Using "global.memory" as the session name selects the global session of the embedded SQLite engine.

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.