All Manuals > LispWorks User Guide and Reference Manual > 23 Common SQL


23.12 Using ODBC

23.12.1 Configuring unixODBC

Configure unixODBC in these files.

For the driver:


For the datasource:

~/.odbc.ini /etc/odbc.ini

23.12.2 Loading unixODBC

At load time do:

(require "odbc")

At runtime, Common SQL automatically loads the unixODBC module from the location in the variable sql::*odbc-foreign-modules*. In LispWorks for Linux this variable initially has the value ("/usr/lib/"). Therefore if, for example, the runtime machine unixODBC installed in
/usr/local/, at runtime do:

(setq sql::*odbc-foreign-modules* '("/usr/local/lib/"))
(sql:connect "mydatabase" :database-type :odbc)

23.12.3 External format for ODBC strings

On Unix, the default external format for ODBC strings is :ascii. On Microsoft Windows it is win32:*multibyte-code-page-ef*.


LispWorks User Guide and Reference Manual - 13 Feb 2015