odbc::get-cast-binary
Ivan Shvedunov <[email protected]> Sat, 10 Dec 2005 22:19:59 +0300
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello.
I've noticed that there's a problem with odbc::get-cast-binary. When
SELECTing a column of type TIMESTAMP from MSSQL database, an error is
signalled sometimes telling that a negative number is not
unsigned-byte. I don't have any FFI experience yet, but I've
noticed that it's possible to fix the problem by replacing :byte with
:unsigned-byte
in the (with-cast-pointer ...) form, see below:
(defun get-cast-binary (ptr len format)
"FORMAT is one of :unsigned-byte-vector, :bit-vector (:string, :hex-string)"
(with-cast-pointer (casted ptr :byte) ; <--- SHOULD BE :unsigned-byte
....
This seems to help, but I'm not 100% sure...
Thanks,
Ivan