18.2.3 Initialization functions and variables

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

The following functions and variables are relevant to initialization:

*default-database-type* specifies the default type of database. Currently supported values are :oracle8 on Unix/Linux, and :odbc on all platforms.

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)

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

LispWorks User Guide - 8 Apr 2005