Progress
Embedded SQL-92
Guide and Reference


SET CONNECTION Statement

Use the SET CONNECTION statement to switch 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 state it was in when suspended.

SYNTAX
EXEC SQL
  SET CONNECTION { ’connection_name’ | DEFAULT } ; 

EXAMPLES

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:

EXEC SQL
     SET CONNECTION ’conn_1’ ; 

Use this statement to set current the database associated with the DEFAULT connection. This statement changes the state of the earlier ’conn_1’ connection from current to suspended:

EXEC SQL
     SET CONNECTION DEFAULT ; 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095