In ODBC when reading data in chunks with a specified out-length, use
[clsql.git] / db-odbc / odbc-api.lisp
index 2f200ca7db40e4da0bc95be08d64a31cb22d3275..f14a9d36b230cfdc3db5394dfaeac36642700525 100644 (file)
@@ -913,13 +913,11 @@ as possible second argument) to the desired representation of date/time/timestam
                                 finally (incf offset (1- i)))
                          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)))
-                      (setf str (sb-ext:octets-to-string octets))
+                      (setf str (uffi:octets-to-string octets))
                       (if (= sql-type $SQL_DECIMAL)
                           (let ((*read-base* 10))
                             (read-from-string str))