The SET CONNECTION StatementThe SET CONNECTION statement lets the application switch between one valid connection to another. It resumes the connection associated with the connection name, restoring the context of that database to its exact state that prevailed at the time of suspension. For example, to set the database associated with the connection name conn_1 as the current database, the statement would be: EXEC SQL SET CONNECTION 'conn_1' ; Here, conn_1 is the connection name associated with a connection. The connection name must have been previously established by a CONNECT statement and must not have been terminated by a DISCONNECT statement. To set the default connection as current, the statement would be: EXEC SQL SET CONNECTION DEFAULT; |
|||