The Common SQL interface requires ODBC or one of the supported database types listed in section "Supported Databases" of the LispWorks User Guide and Reference Manual .
To load Common SQL enter, for example:
(require "odbc")
(require "oracle")
Initialize the database type at run time, for example:
(sql:initialize-database-type :database-type :odbc)
(sql:initialize-database-type :database-type :oracle)
See the LispWorks User Guide and Reference Manual for further information.
Common SQL on Mac OS X has been tested with DBMS Postgres 7.2.1, MySQL 5.0.18, Oracle Instant Client 10.2.0.4, ODBC driver PSQLODBC development code, and IODBC as supplied with Mac OS X.
The current release of Mac OS X comes with an ODBC driver manager from IODBC, including a GUI interface. IODBC attempts to put the file .odbc.ini
file in a non-standard location. This causes problems at least with the PSQLODBC driver for PostgreSQL, because PSQLODBC expects to find .odbc.ini
in either the users's home directory or the current directory. There may be similar problems with other drivers. Therefore the file .odbc.ini
should be placed in its standard place ~/.odbc.ini
. The IODBC driver manager looks there too, so it will work.
The PSQLODBC driver, when it does not find any of the Servername, Database or Username in .odbc.ini
, returns the wrong error code. This tells the calling function that the user cancelled the login dialog.
Therefore, if Common SQL reports that the user cancelled when trying to connect, you need to check that you have got Servername, Database and Username, with the correct case, in the section for the datasource in the .odbc.ini
file.
Note: Username may alternatively be given in the connect string.
LispWorks Release Notes and Installation Guide - 19 Oct 2017