| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments: &key data-source-name user password prompt hwnd width external-format connect-string non-blocking
This function establishes a connection to the database denoted by data-source-name (a string) and returns a database object.
See aodbc.htm for a description of how data source names are defined. ODBC has two functions to establish a connection - one expects all the information to make the connection to be passed to the function and the other is willing to look for that information and possibly prompt for it. If the value of prompt is true (which it is by default) then the connect function will use the ODBC function that prompts for data (on Windows) or looks in the .odbc.ini file (on Unix).
The kind of information that ODBC will often need to make a connection
is the user name and password. On Windows if a prompting dialog box
must be put up, it will be made the child window of
hwnd, if it is true. If
hwnd is nil
then the
prompt windows will be at top level. If the connection cannot be made,
an error is signaled. width is the default size
for character buffers used in retrieving character-valued fields
returned by an sql statement. If
width is not specified it defaults to 1024.
The external-format keyword argument specifies
the external format to be used when storing characters in the
database. If not specified the value of *default-odbc-external-format*
is
used.
The connect-string keyword argument allows specifying the precise connection string to be passed to the ODBC library function to connect to a database. If a value is specified for connect-string, then the values of data-source-name, user and password are ignored.
The format of a connection string is described in ODBC documentation. At the time of writing, a concise description was available at http://msdn.microsoft.com/en-us/library/ms715433(VS.85).aspx.
The non-blocking keyword argument, if true,
causes Lisp to never block other threads from running when making a
call to the odbc libraries. The default is true. Note that
non-blocking mode can slow down the operation of the interface. The
non-blocking argument sets the non-blocking flag
inside the database object returned by connect. You can change the non-blocking
behavior with the function db-non-blocking, with the form
(setf (db-non-blocking db-object) new-value)
See aodbc.htm for more information on Allegro ODBC.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |