In ODBC when reading data in chunks with a specified out-length, use that as
[clsql.git] / db-odbc / odbc-api.lisp
index 85f160a5bf4085bb9639421efb4c6b04cd01b7b8..aefd83820984cb5cee685d2df0eec26d0d572f30 100644 (file)
@@ -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.
 ;;;;
@@ -914,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)))