X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-api.lisp;h=aefd83820984cb5cee685d2df0eec26d0d572f30;hb=31499d71a3f3dd75dfdc7f1012603d0c680ed65a;hp=50ef4432d3485df1f6792b2cb01041c8a4e39106;hpb=e567409d9fff3f7231c2a0bb69b345e19de2b246;p=clsql.git diff --git a/db-odbc/odbc-api.lisp b/db-odbc/odbc-api.lisp index 50ef443..aefd838 100644 --- a/db-odbc/odbc-api.lisp +++ b/db-odbc/odbc-api.lisp @@ -6,8 +6,6 @@ ;;;; Purpose: Low-level ODBC API using UFFI ;;;; Authors: Kevin M. Rosenberg and Paul Meurer ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2004 by Kevin M. Rosenberg ;;;; and Copyright (C) Paul Meurer 1999 - 2001. All rights reserved. ;;;; @@ -26,10 +24,11 @@ May be locally bound to something else if a certain type is necessary.") (defvar *binary-format* :unsigned-byte-vector) (defvar *time-conversion-function* (lambda (universal-time &optional fraction) - (declare (ignore fraction)) - (clsql-sys:format-time - nil (clsql-sys:utime->time universal-time) - :format :iso) + (let ((time (clsql-sys:utime->time universal-time))) + (setf time (clsql-sys:time+ + time + (clsql-sys:make-duration :usec (/ fraction 1000)))) + (clsql-sys:format-time nil time :format :iso)) #+ignore universal-time) "Bound to a function that converts from a Lisp universal time fixnum (and a fractional @@ -913,10 +912,7 @@ as possible second argument) to the desired representation of date/time/timestam (error 'clsql:sql-database-error :message "wrong type. preliminary.")) while (and (= res $SQL_SUCCESS_WITH_INFO) - #+ingore(eq (sql-state +null-handle-ptr+ +null-handle-ptr+ hstmt) - $sql-data-truncated) - (equal (sql-state +null-handle-ptr+ +null-handle-ptr+ hstmt) - "01004")) + (> out-len +max-precision+)) do (setf res (%sql-get-data hstmt column-nr c-type data-ptr +max-precision+ out-len-ptr) out-len (deref-pointer out-len-ptr #.$ODBC-LONG-TYPE)))