The connection specifications.
A database type.
A displayed CAPI element, or
The allowed values for
, though not all of these are supported on some platforms. See the section "Supported databases" in the
LispWorks User Guide
for details of per-platform database support.
The default for database-type is the value of *default-database-type*.
sets the variable *default-database* to an instance of the database opened, and returns that instance.
" datasource-name / username / password "
is the name of an ODBC datasource, and
are a valid username and password. If the datasource does not require a username and password they can be omitted. For databases of type
, the connection specification is passed as-is to the Oracle logon call. For example, if you have an Oracle user matching the current Unix username and that does need a password to connect, you can call
Makes a new connection even if connections to the same database already exist.
Makes a new connection but warns about existing connections.
Makes a new connection but signals an error for existing connections.
Selects old connection if one exists (and warns) or makes a new one.
Selects old connection if one exists or makes a new one.
The default value of if-exists is the value of *connect-if-exists*.
is used if
needs to display a dialog to ask the user for username and password. If
is a CAPI element, this is used. If
is any other value (the default value is
is called in a process which is associated with a CAPI interface, then this CAPI interface is used.
has been added because dialogs asking for passwords can fail otherwise. This depends on the driver that the datasource uses: the problem has only been observed using MS SQL on Windows.
(connect "personnel/admin/secret" :database-type :odbc)