r9072: fix variable name
[clsql.git] / base / database.lisp
index 62c6077d313ac7684e8debfd7b209da31a7d6b89..1e64fb3588d388c814fc9ad7514ea69f9c2de523 100644 (file)
@@ -181,7 +181,7 @@ if the database connection has been lost."
              ((or string list)
               (let ((db (find-database database :errorp nil)))
                 (when (null db)
-                  (if (and database errorp)
+                  (if (and database error)
                       (error 'clsql-generic-error
                              :message
                              (format nil "Unable to find database with connection-spec ~A." database))
@@ -190,8 +190,8 @@ if the database connection has been lost."
                              
     (when (is-database-open db)
       (if force
-         (ignore-errors (disconnect db))
-         (disconnect db :error nil)))
+         (ignore-errors (disconnect :database db))
+         (disconnect :database db :error nil)))
     
     (connect (connection-spec db))))