Index: 64-bit/src/odbc/column.lisp
===================================================================
--- 64-bit/src/odbc/column.lisp	(revision 64-bit,4)
+++ 64-bit/src/odbc/column.lisp	(revision 64-bit,8)
@@ -112,5 +112,4 @@
           (cffi:foreign-alloc :char :count (slot-value column 'buffer-length))))
 
-;; dso+
 (defmethod get-column-value ((column string-column))
   (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
@@ -147,5 +146,4 @@
           (cffi:foreign-alloc :uchar :count (slot-value column 'buffer-length))))
 
-;; dso+
 (defmethod get-column-value ((column unicode-string-column))
   (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
@@ -174,5 +172,4 @@
 
 
-;; dso+
 (defmethod get-column-value ((column integer-column))
   (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
@@ -188,5 +185,4 @@
 (defclass double-column (column) ())
 
-;; dso+
 (defmethod initialize-column ((column double-column) args)
   (declare (ignore args))
@@ -196,5 +192,4 @@
   (setf (slot-value column 'value-ptr) (cffi:foreign-alloc :double)))
 
-;; dso+
 (defmethod get-column-value ((column double-column))
   ;; (%get-long (slot-value column 'ind-ptr))
@@ -211,5 +206,4 @@
 (defclass date-column (column) ())
 
-;; dso+
 (defmethod initialize-column ((column date-column) args)
   (declare (ignore args)) 
@@ -219,5 +213,4 @@
   (setf (slot-value column 'value-ptr) (cffi:foreign-alloc :uchar :count 32)))
 
-;; dso+
 (defmethod get-column-value ((column date-column))
   (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
@@ -248,5 +241,5 @@
 
 (defmethod get-column-value ((column binary-column))
-  (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) :long)))
+  (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
     (if (= len $SQL_NULL_DATA) 
       nil
@@ -258,5 +251,4 @@
 (defclass bigint-column (column) ())
 
-;; dso+
 (defmethod initialize-column ((column bigint-column) args)
   (declare (ignore args))
@@ -267,5 +259,4 @@
   (setf (slot-value column 'value-ptr) (cffi:foreign-alloc :uchar :count 25)))
 
-;; dso+
 (defmethod get-column-value ((column bigint-column))
   (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
@@ -322,15 +313,15 @@
 
 (defmethod get-column-value ((column decimal-column))
-  (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) :long)))
+  (let ((len (cffi:mem-ref (slot-value column 'ind-ptr) 'sql-len)))
     (if (= len $SQL_NULL_DATA) 
-      nil
-      (let ((bytes (get-byte-vector (slot-value column 'value-ptr) len))
-            (sum 0))
-        (dotimes (i 16)
-          (setf sum (+ (* 256 sum) (aref bytes (- (+ 3 16) 1 i)))))
-        (* 
-         sum
-         (if (zerop (aref bytes 2)) -1 1) ;sign
-         (expt 10 (- (aref bytes 1))))))))
+        nil
+        (let ((bytes (get-byte-vector (slot-value column 'value-ptr) len))
+              (sum 0))
+          (dotimes (i 16)
+            (setf sum (+ (* 256 sum) (aref bytes (- (+ 3 16) 1 i)))))
+          (* 
+           sum
+           (if (zerop (aref bytes 2)) -1 1) ;sign
+           (expt 10 (- (aref bytes 1))))))))
 
 
@@ -350,5 +341,5 @@
   (let* ((value-ptr (cffi:foreign-alloc :char 
                                         :count (slot-value column 'buffer-length)))
-         (ind-ptr (cffi:foreign-alloc :long)))
+         (ind-ptr (cffi:foreign-alloc 'sql-len)))
     (unwind-protect
       (get-character-data 
@@ -374,5 +365,5 @@
 (defmethod get-column-value ((column uclob-column))
   (let* ((value-ptr (cffi:foreign-alloc :char :count (slot-value column 'buffer-length)))
-         (ind-ptr (cffi:foreign-alloc :long)))
+         (ind-ptr (cffi:foreign-alloc 'sql-len)))
     (unwind-protect
       (get-unicode-character-data 
@@ -398,5 +389,5 @@
 (defmethod get-column-value ((column blob-column))
   (let* ((value-ptr (cffi:foreign-alloc  :uchar :count (slot-value column 'buffer-length)))
-         (ind-ptr (cffi:foreign-alloc :long)))
+         (ind-ptr (cffi:foreign-alloc 'sql-len)))
     (unwind-protect
       (get-binary-data 
@@ -412,5 +403,4 @@
 ;;  fetch data via SQlGetData
 ;; ------------------------------
-;; dso+
 (defun get-character-data (hstmt position value-ptr buffer-length ind-ptr)
   ;; local error handling, we can not use the general error handling
@@ -530,5 +520,4 @@
              (get-output-stream-string sos))))))))
     
-;; dso+
 (defun get-binary-data (hstmt position value-ptr buffer-length ind-ptr)
   ;; local error handling, we can not use the general error handling
