LispWorks User Guide and Reference Manual > 19 Common SQL > 19.2 Initialization

NextPrevUpTopContentsIndex

19.2.3 Initialization functions and variables

The initialization of the chosen database type is achieved by calling initialize-database-type with the appropriate value of database-type . In an application, this step should be done at runtime. Where multiple database types are supported, it is possible to initialize more than one database type if needed (by making multiple calls to initialize-database-type).

The following functions and variables are relevant to initialization:

*default-database-type* specifies the default type of database. The possible values are shown in the database-type column of Supported databases.

The function initialize-database-type initializes a database type according to the value of its database-type argument, which defaults to the value of *default-database-type*.

A sample code sequence for initializing Common SQL to work with an ODBC database, using the above functions and variables, is as follows:

(require "odbc")
(setf *default-database-type* :odbc)
(initialize-database-type)

You can find which database types have been initialized by the value of the variable *initialized-database-types*.


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex