8. SQL Statements : SET_SQL
 
Share this page                  
SET_SQL
Valid in: ESQL
The SET_SQL statement specifies runtime options for the current session.
Use SET_SQL to switch sessions in a multiple session application, specify whether local or generic errors are returned to a session, change the default behavior when a connection error is experienced, or set trace functions. To determine the settings for the current session, use the INQUIRE_SQL statement.
SET_SQL can be used to override the II_EMBED_SET environment variable/logical. For information about II_EMBED_SET, see the System Administrator Guide.
Note:  While SET_SQL is not supported in OpenAPI, Iiapi_catchEvent() operates similarly to embedded SQL statement SET_SQL(DBEVENTHANDLER = dbevent_handler).