ASA SQL Reference
SQL Statements
Use this statement to change the active database connection.
SET CONNECTION [connection-name]
connection-name :
identifier, string, or hostvar
The SET CONNECTION statement changes the active database connection to connection-name. The current connection state is saved, and will be resumed when it again becomes the active connection. If connection-name is omitted and there is a connection 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 of the previously active connection become inaccessible. These cursors remain active and in position, and become accessible when the associated connection becomes active again.
None.
None.
CONNECT statement [ESQL] [Interactive SQL]
DISCONNECT statement [ESQL] [Interactive SQL]
SQL/92 Interactive SQL use is a vendor extension. Embedded SQL is a Full level feature.
SQL/99 Interactive SQL is a vendor extension. Embedded SQL is a core feature.
Sybase Supported by Open Client/Open Server.
The following example is in Embedded SQL.
EXEC SQL SET CONNECTION :conn_name;
From Interactive SQL, set the current connection to the connection named conn1.
SET CONNECTION conn1;