X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-odbc%2Fodbc-api.lisp;h=aa5bbbc822c49b5a416c37a774cda83d18e36c72;hp=4095f6cfeef3d4872add1725fd31daa8cd58f587;hb=1b0f85909248ac92d13f4af72d69ef68ffeb890c;hpb=abfd6ad47ac151ccdda9cb7ee59e57958d5768fa diff --git a/db-odbc/odbc-api.lisp b/db-odbc/odbc-api.lisp index 4095f6c..aa5bbbc 100644 --- a/db-odbc/odbc-api.lisp +++ b/db-odbc/odbc-api.lisp @@ -249,11 +249,11 @@ as possible second argument) to the desired representation of date/time/timestam (defun %new-statement-handle (hdbc) (let ((statement-handle - (with-foreign-object (hstmt-ptr 'sql-handle) + (with-foreign-object (phstmt 'sql-handle) (with-error-handling (:hdbc hdbc) - (SQLAllocStmt hdbc hstmt-ptr) - (deref-pointer hstmt-ptr 'sql-handle))))) + (SQLAllocHandle $SQL_HANDLE_STMT hdbc phstmt) + (deref-pointer phstmt 'sql-handle))))) (if (uffi:null-pointer-p statement-handle) (error 'clsql:sql-database-error :message "Received null statement handle.") statement-handle)))