Kbase P118861: ESQL/C: What does the DISCONNECT statement do and what is its syntax?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/12/2009 |
|
Status: Verified
GOAL:
ESQL/C: What does the DISCONNECT statement do and what is its syntax?
GOAL:
Embedded SQL-92: What does the "EXEC SQL DISCONNECT ALL;" statement do?
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
FIX:
The Embedded SQL-92 DISCONNECT statement terminates the connection between an application and the database to which it is connected. The ESQL/C DISCONNECT statement has the following four syntax forms:
EXEC SQL
DISCONNECT 'myConnectionName';
Disconnects the named database. If there is also an established connection to the DEFAULT database, the connection to the DEFAULT database becomes the current connection. If there is no DEFAULT database, there is no current connection after the SQL engine processes the DISCONNECT.
EXEC SQL
DISCONNECT CURRENT;
Disconnects the CURRENT database. If there is an established connection to the DEFAULT database, the connection to the DEFAULT database becomes the current connection. If there is no DEFAULT database, there is no current connection after the SQL engine processes the DISCONNECT.
EXEC SQL
DISCONNECT ALL;
Disconnects all established connections. After you issue DISCONNECT ALL, there is no CURRENT connection.
EXEC SQL
DISCONNECT DEFAULT;
Terminates the connection to the DEFAULT database. If this connection is the current connection, there is no current connection after this DISCONNECT statement is executed.