NextPrevUpTopContentsIndex

20.2.3 Initialization functions and variables

The initialization of the chosen database type is achieved by calling sql: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 .

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 sql:*default-database-type* :odbc)
(sql:initialize-database-type)

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


LispWorks User Guide - 11 Mar 2008

NextPrevUpTopContentsIndex