connect

Function

Package: dbi

Arguments: &key data-source-name user password prompt hwnd width

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.

See aodbc.htm for more information on Allegro ODBC.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.