FunctionPackage: dbiToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Moderately revised from 6.1

connect

Arguments: &key data-source-name user password prompt hwnd width external-format connect-string

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 avbailable at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcsqldriverconnect.asp.

See aodbc.htm for more information on Allegro ODBC.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page has had moderate revisions compared to the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Moderately revised from 6.1