X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-dbi.lisp;h=fc8f3000bed3380d7e0677bab1b7b625e398999b;hb=5bfa219c5e3b387b9dd7c819441f0182ccb16dc8;hp=3a14e72b14bc5189bd9077c94bbcba35ca18adda;hpb=8c6c643e3debe875bd14408cc3129d8148dfd125;p=clsql.git diff --git a/db-odbc/odbc-dbi.lisp b/db-odbc/odbc-dbi.lisp index 3a14e72..fc8f300 100644 --- a/db-odbc/odbc-dbi.lisp +++ b/db-odbc/odbc-dbi.lisp @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Create: April 2004 ;;;; -;;;; $Id: odbc-sql.lisp 8983 2004-04-12 21:16:48Z kevin $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -176,7 +176,7 @@ the query against." )) ((zerop count) (close-query query) (when eof-errorp - (error 'sql-database-data-error + (error 'clsql:sql-database-data-error :message "ODBC: Ran out of data in fetch-row")) eof-value) (t @@ -559,9 +559,9 @@ This makes the functions db-execute-command and db-query thread safe." (#.odbc::$SQL_SMALLINT :short) ((#.odbc::$SQL_FLOAT #.odbc::$SQL_DOUBLE) #.odbc::$ODBC-LONG-TYPE) (#.odbc::$SQL_REAL #.odbc::$ODBC-LONG-TYPE) - (#.odbc::$SQL_DATE 'sql-c-date) - (#.odbc::$SQL_TIME 'sql-c-time) - (#.odbc::$SQL_TIMESTAMP 'sql-c-timestamp) + ((#.odbc::$SQL_DATE #.odbc::$SQL_TYPE_DATE) 'sql-c-date) + ((#.odbc::$SQL_TIME #.odbc::$SQL_TYPE_TIME) 'sql-c-time) + ((#.odbc::$SQL_TIMESTAMP #.odbc::$SQL_TYPE_TIMESTAMP) 'sql-c-timestamp) ;;((#.odbc::$SQL_BINARY #.odbc::$SQL_VARBINARY #.odbc::$SQL_LONGVARBINARY) odbc::$SQL_C_BINARY) ; ?? (#.odbc::$SQL_TINYINT :short) ;;(#.odbc::$SQL_BIT odbc::$SQL_C_BIT) ; ?? @@ -584,7 +584,9 @@ This makes the functions db-execute-command and db-query thread safe." ;; support SQLDescribeParam. To do: put code in here for drivers that do ;; support it. (unless (string-equal sql "insert" :end1 6) - (error "Only insert expressions are supported in literal ODBC: '~a'." sql)) + (error 'clsql:sql-database-error + (format nil + "Only insert expressions are supported in literal ODBC: '~a'." sql))) (%db-execute query (format nil "select ~{~a~^,~} from ~a where 0 = 1" (or parameter-columns '("*")) parameter-table)) (%initialize-query query nil nil)