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



disconnect.bmp
 

connection_identifier

Can either be a character-string constant or single host variable identifier. The host variable must have been 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 Adabas SQL Gateway 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 Adabas SQL Gateway Embedded SQL when terminating an application.  

DISCONNECT DEFAULT

Terminates the SQL session with the default Adabas SQL Gateway Embedded SQL.  

DISCONNECT connection specifier

Terminates the SQL session with the server specified by the connection identifier.

 

Limitations

None.

 

ANSI Specifics

None.

 

Adabas SQL Gateway Embedded SQL Specifics

The DISCONNECT statement is an Adabas SQL Gateway 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.

 

Example

The following example disconnects from the session identified by the connection specifier MYSESSION:

 

DISCONNECT :MYSESSION;