The connection specifications.
A database type.
A displayed CAPI element, or
function opens a connection to a database of
. The default for
is the value of
sets the variable
to an instance of the database opened and returns the 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.
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)