In ODBC when reading data in chunks with a specified out-length, use that as
authornathan@acceleration.net <nathan@acceleration.net>
Thu, 10 Apr 2008 15:25:12 +0000 (11:25 -0400)
committerNathan Bird <nathan@acceleration.net>
Thu, 4 Mar 2010 18:59:41 +0000 (13:59 -0500)
an indicator since freetds doens't set the info status appropriately.

db-odbc/odbc-api.lisp

index dfdbe21ed10fec7bb1e0b6dd6aa872a1efa986d1..aefd83820984cb5cee685d2df0eec26d0d572f30 100644 (file)
@@ -912,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)))