|
@@ -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);
|