(progn ,result-code ,@body))
(#.$SQL_INVALID_HANDLE
(error
- 'clsql-base-sys:clsql-odbc-error
+ 'clsql-base:clsql-odbc-error
:odbc-message "Invalid handle"))
(#.$SQL_STILL_EXECUTING
(error
- 'clsql-base-sys:clsql-odbc-error
+ 'clsql-base:clsql-odbc-error
:odbc-message "Still executing"))
(#.$SQL_ERROR
(multiple-value-bind (error-message sql-state)
(or ,hdbc +null-handle-ptr+)
(or ,hstmt +null-handle-ptr+))
(error
- 'clsql-base-sys:clsql-odbc-error
+ 'clsql-base:clsql-odbc-error
:odbc-message error-message
:sql-state sql-state)))
(otherwise
;; FIXME: this could be better optimized for types which use READ-FROM-STRING above
(if (and (or (eq result-type t) (eq result-type :string))
+ value
(not (stringp value)))
(write-to-string value)
value)))