Progress
SQL-92
Guide and Reference
SET CONNECTION Statement
Switches the application from one established connection to another. This resumes the connection associated with the specified connection_name, restoring the context of that database connection to the same state it was in when suspended.
SYNTAX
connection_name
The name of the connection as either a character literal or host variable. If the
SET CONNECTION
statement omits a connection name, the default is the name of the database. Connection names must be unique.DEFAULT
Sets the
EXAMPLESDEFAULT
connection as the current connection.The first example shows how to establish a database as the current database. The SET CONNECTION command sets the database associated with the connection named conn_1 to the status of current database. The connection named conn_1 must be associated with an established connection:
Use SET CONNECTION DEFAULT to set current the database associated with the DEFAULT connection. This statement suspends the conn_1 connection, which had been current.
See also the last example for the DISCONNECT Statement, which illustrates the CONNECT, SET CONNECTION, and DISCONNECT statements in combination.
AUTHORIZATION
None
SQL COMPLIANCE
SQL-92
ENVIRONMENT
Embedded SQL only
RELATED STATEMENTS
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |