X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-sql.lisp;h=1f00008493be1d9ccaf7375c70f6cfd977bc3895;hb=11261eca2090842638d1b3b7c12b7cc1f6d58f09;hp=e1ad0c234d03333177ae3c4798777880076ef1ef;hpb=5148be446aee32ec705beac3fbba35f499df4fd4;p=clsql.git diff --git a/db-odbc/odbc-sql.lisp b/db-odbc/odbc-sql.lisp index e1ad0c2..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 ;;;; @@ -48,7 +48,11 @@ :password password :data-source-name dsn)))) (store-type-of-connected-database db) + ;; Ensure this database type is initialized so can check capabilities of + ;; underlying database + (initialize-database-type :database-type database-type) db) + #+ignore (error () ;; Init or Connect failed (error 'sql-connection-error :database-type database-type @@ -67,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))