CONNX Data Integration Suite 14.8.0 | CONNX Embedded SQL for Adabas | Standard SQL Statements | DISCONNECT
 
DISCONNECT
Function
The DISCONNECT statement explicitly terminates an SQL session between a user and the Adabas SQL Gateway Embedded SQL environment.
Invocation
Embedded Mode P Dynamic Mode Interactive Mode P
Syntax
The syntax of the statement is DISCONNECT and then optional ALL, CURRENT, DEFAULT, or connection_identifier.
connection_identifier
Can either be a character-string constant or a single host variable identifier. The host variable must be defined in the application program according to the host language rules, and its value must be a character string. The maximum length is 32 characters.
Description
The DISCONNECT statement terminates an SQL session between an application program and CONXN Embedded SQL. The DISCONNECT statement performs an implicit ROLLBACK.
DISCONNECT/DISCONNECT CURRENT
Terminate current SQL session. The previous syntax of the DISCONNECT statement is still supported and is represented as the DISCONNECT CURRENT statement.
DISCONNECT ALL
Terminates all SQL sessions. A DISCONNECT ALL statement is performed automatically by the exit handler of CONNX Embedded SQL when terminating an application.
DISCONNECT DEFAULT
Terminates the SQL session with the default CONNX Embedded SQL.
DISCONNECT connection specifier
Terminates the SQL session with the server specified by the connection identifier.
Limitations
None.
ANSI Specifics
None.
CONNX Embedded SQL Specifics
The DISCONNECT statement is a CONNX Embedded SQL extension.
The previous syntax of the DISCONNECT statement is still supported and is equivalent to Version's 1.3 (or higher) DISCONNECT CURRENT.
Here is an example on how to disconnect the session that is identified by the connection specifier MYSESSION:
DISCONNECT :MYSESSION;