apache > db
Apache DB Project
Font size:      






Issues a java.sql.Connection.close request against the current connection. There must be a current connection at the time the request is made.

If ALL is specified, all known connections are closed and there is no current connection.

Disconnect CURRENT is the same as Disconnect.

If a connection name is specified with an identifier, the command disconnects the named connection. The name must be the name of a connection in the current session provided with the ij.connection.connectionName property or with the Connect command.

If the ij.database property or the Connect command without the AS clause was used, you can supply the name the system generated for the connection. If the current connection is the named connection, when the command completes, there will be no current connection and you must issue a Set Connection or Connect command.

A Disconnect command issued against a Derby connection does not shut down the database or Derby (but the Exit command does).


ij> connect 'jdbc:derby:menuDB;create=true';
ij> -- we create a new table in menuDB: 
CREATE TABLE menu(course CHAR(10), ITEM char(20), PRICE integer);
0 rows inserted/updated/deleted
ij> disconnect;

ij> protocol 'jdbc:derby:';
ij> connect 'toursDB' as tours1;
ij> connect 'newDB;create=true' as newDB;
TOURS1 -    jdbc:derby:toursDB
NEWDB* -    jdbc:derby:newDB;create=true
* = current connection
ij(NEWDB)> set connection tours1;
ij> disconnect tours1;
ij> disconnect all;

Previous Page
Next Page
Table of Contents