X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-odbc%2Fodbc-sql.lisp;h=656e8f43c13a0388d2d9697f76462cfc8bb08359;hp=2769bf91b3c6b6881b6bf4bc77d16feb6b8b68fd;hb=8a8ee2d7d791b7a3efaed06420802a925d16fca3;hpb=9bbed78051e80e6ab76ae47834136035602bbbf1 diff --git a/db-odbc/odbc-sql.lisp b/db-odbc/odbc-sql.lisp index 2769bf9..656e8f4 100644 --- a/db-odbc/odbc-sql.lisp +++ b/db-odbc/odbc-sql.lisp @@ -17,7 +17,7 @@ ;;;; ************************************************************************* (defpackage #:clsql-odbc - (:use #:common-lisp #:clsql-base) + (:use #:common-lisp #:clsql-sys) (:export #:odbc-database) (:documentation "This is the CLSQL interface to ODBC.")) @@ -256,10 +256,14 @@ ;; NULLABLE is the eleventh column (loop for row in rows when (string-equal attribute (fourth row)) - do (return (values (ensure-keyword (sixth row)) - (parse-integer (seventh row) :junk-allowed t) - (parse-integer (ninth row) :junk-allowed t) - (parse-integer (nth 10 row) :junk-allowed t)))))) + do + (let ((size (seventh row)) + (precision (ninth row)) + (scale (nth 10 row))) + (return (values (ensure-keyword (sixth row)) + (when size (parse-integer size)) + (when precision (parse-integer precision)) + (when scale (parse-integer scale)))))))) (defmethod database-set-sequence-position (sequence-name (position integer) @@ -355,5 +359,5 @@ ;; nothing to do t) -(when (clsql-base:database-type-library-loaded :odbc) - (clsql-base:initialize-database-type :database-type :odbc)) +(when (clsql-sys:database-type-library-loaded :odbc) + (clsql-sys:initialize-database-type :database-type :odbc))