Drops a connection with the database.
Syntax
DISCONNECT [ { <connection-name> | CURRENT | ALL } ]
Parameters
(back to top)
- ALL drops all of the connections of the application
to all database environments.
- CURRENT (default) drops the current
connection.
Examples
(back to top)
- Example 1 To use DISCONNECT in Embedded SQL, enter:
EXEC SQL DISCONNECT :conn_name
- Example 2 To use DISCONNECT from dbisql to
disconnect all connections, enter:
Usage
(back to top)
The DISCONNECT statement drops a
connection with the database server and releases all resources used by it. If the
connection to be dropped was named on the CONNECT
statement, the name can be specified.
An implicit ROLLBACK is executed
on connections that are dropped.
Standards
(back to top)
- SQL—ISO/ANSI SQL compliant.
- SAP Database products—Supported by Open
Client/Open Server.