Changes the active database connection.
SET CONNECTION [<connection-name>]
SET CONNECTION conn1
The current connection state is saved, and resumed when it again becomes the active connection. If you omit <connection-name>, but a connection exists, that was not named, that connection becomes the active connection.
When cursors are opened in Embedded SQL, they are associated with the current connection. When the connection is changed, the cursor names are not accessible. The cursors remain active and in position and become accessible when the associated connection becomes active again.