X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-odbc%2Fodbc-sql.lisp;h=1f00008493be1d9ccaf7375c70f6cfd977bc3895;hp=9f88a9c6e751d7b8c8b1d8ad8b19306d64f73042;hb=26cfa48009c72652e0ba8ce9aed8c53216e9a3d3;hpb=5bfa219c5e3b387b9dd7c819441f0182ccb16dc8 diff --git a/db-odbc/odbc-sql.lisp b/db-odbc/odbc-sql.lisp index 9f88a9c..1f00008 100644 --- a/db-odbc/odbc-sql.lisp +++ b/db-odbc/odbc-sql.lisp @@ -3,7 +3,7 @@ ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: odbc-sql.cl -;;;; Purpose: Low-level interface for CLSQL ODBC backend +;;;; Purpose: Medium-level interface for CLSQL ODBC backend ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; @@ -50,8 +50,9 @@ (store-type-of-connected-database db) ;; Ensure this database type is initialized so can check capabilities of ;; underlying database - (initialize-database-type :database-type db-type) + (initialize-database-type :database-type database-type) db) + #+ignore (error () ;; Init or Connect failed (error 'sql-connection-error :database-type database-type @@ -70,9 +71,14 @@ (cond ((or (search "postgresql" server-name :test #'char-equal) (search "postgresql" dbms-name :test #'char-equal)) + (unless (find-package 'clsql-postgresql) + (ignore-errors (asdf:operate 'asdf:load-op 'clsql-postgresql-socket))) :postgresql) ((or (search "mysql" server-name :test #'char-equal) (search "mysql" dbms-name :test #'char-equal)) + (unless (find-package 'clsql-mysql) + ;; ignore errors on platforms where the shared libraries are not available + (ignore-errors (asdf:operate 'asdf:load-op 'clsql-mysql))) :mysql) ((or (search "oracle" server-name :test #'char-equal) (search "oracle" dbms-name :test #'char-equal))