SQL (ODBCQuery - LotusScript)

Read-write. Any SQL statement.

Defined in

ODBCQuery

Data type

String

Syntax

To get: statement$ = odbcQuery . SQL

To set: odbcQuery . SQL = statement$

Usage

When an SQL statement is stored, it is analyzed for parameters, table names, and other items, but full parsing can only be performed by the data source when the statement is executed. There is no practical limit to the length of the SQL statement written, nor is the SQL statement limited to a query (SELECT statement). The SQL statement is not executed until an ODBCResultSet object is created and Execute is performed.

When using the SQL property, be aware that Notes could stop under the following circumstances:

  • The SQL statement contains the word FROM and it doesn't specify a table name.
  • While the SQL statement is being checked, memory becomes unavailable.

Statement execution depends on a user's access rights. A user may not be authorized to alter certain fields or tables, perform certain operations, or access certain tables or columns.

Events

BeforeSetSQL

AfterSetSQL

Example