diff --git a/fcl/db/sqldb/odbc/Makefile b/fcl/db/sqldb/odbc/Makefile index 7c68121a45..22d603521d 100644 --- a/fcl/db/sqldb/odbc/Makefile +++ b/fcl/db/sqldb/odbc/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/08/02] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/11/20] # default: all MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux diff --git a/fcl/db/sqldb/odbc/odbcconn.pas b/fcl/db/sqldb/odbc/odbcconn.pas index e43b71ee26..7b6f0b1f01 100644 --- a/fcl/db/sqldb/odbc/odbcconn.pas +++ b/fcl/db/sqldb/odbc/odbcconn.pas @@ -418,7 +418,7 @@ procedure TODBCConnection.DeAllocateCursorHandle(var cursor: TSQLCursor); begin // make sure we don't deallocate the cursor if the connection was lost already if not Connected then - (cursor as TODBCCursor).FSTMTHandle:=SQL_INVALID_HANDLE; + (cursor as TODBCCursor).FSTMTHandle:=SQL_NULL_HSTMT; FreeAndNil(cursor); // the destructor of TODBCCursor frees the ODBC Statement handle end; @@ -888,7 +888,7 @@ begin FBlobStreams.Free; - if FSTMTHandle<>SQL_INVALID_HANDLE then + if FSTMTHandle<>SQL_NULL_HSTMT then begin // deallocate statement handle Res:=SQLFreeHandle(SQL_HANDLE_STMT, FSTMTHandle);