All Manuals > LispWorks User Guide and Reference Manual > 38 The SQL Package

NextPrevUpTopContentsIndex

disconnect

Function
Summary

Closes a connection to a database.

Package

sql

Signature

disconnect &key database error => success

Arguments

database

A database.

error

A boolean.

Values

success

A boolean.

Description

The function disconnect closes a connection to a database specified by database. If successful, success is t and if only one other connection exists, *default-database* is reset.

The default value for database is *default-database*. If database is a database object, then it is used directly. Otherwise, the list of connected databases is searched to find one with database as its connection specifications (see connect). If no such database is found, then if error and database are both non-nil an error is signaled, otherwise disconnect returns nil .

Example

(disconnect :database "test")

See also

connect
connected-databases
database-name
*default-database*
find-database
reconnect
status


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex