SET CONNECTION statement
Use the SET CONNECTION statement to reestablish a connection between an application and a database environment and to make the connection current. You can also use this statement with the DORMANT option to put the current connection in a dormant state. Use this statement with Informix® ESQL/C.
Syntax
>>-SET CONNECTION-----------------------------------------------> >--+-+-'connection '----------------------+--+---------------+-+->< | | (1) | | (1) | | | +-------connection_var---------------+ '-------DORMANT-' | | | (1) (2) | | | +-------| Database Environment |-----+ | | '-DEFAULT----------------------------' | | (1) | '-------CURRENT DORMANT-------------------------------------'
Notes:
- Informix extension
- See Database Environment
Element | Description | Restrictions | Syntax |
---|---|---|---|
connection | Name of the initial connection that the CONNECT statement made | The database must already exist | Quoted String |
connection_var | Host variable that contains the value of connection | Must be a character data type | Language specific |
Usage
You can use SET CONNECTION to make a dormant connection the current connection or to make the current connection dormant.
SET CONNECTION is not valid as a prepared statement.