Browse Source

ID only 32 bit

(cherry picked from commit bdf5343770f8b1b2ef9170d7c571681d700653f4)
Michaël Van Canneyt 2 years ago
parent
commit
50cd370360
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/fcl-db/src/sqldb/postgres/pqconnection.pp

+ 3 - 3
packages/fcl-db/src/sqldb/postgres/pqconnection.pp

@@ -39,9 +39,9 @@ type
 
   TPGHandle = Class(TSQLHandle)
   strict private
-    class var _HID : Int64;
+    class var _HID : Integer;
   private
-    FHandleID : Int64;
+    FHandleID : Integer;
     FConnected: Boolean;
     FCOnnection: TPQConnection;
     FDBName : String;
@@ -267,7 +267,7 @@ begin
   FConnection:=aConnection;
   FCursorList:=TThreadList.Create;
   FCursorList.Duplicates:=dupIgnore;
-  FHandleID:=InterlockedIncrement64(_HID);
+  FHandleID:=InterlockedIncrement(_HID);
   {$IFDEF PQDEBUG}
   Writeln('>>> ',FHandleID,' [',TThread.CurrentThread.ThreadID, ']  allocating handle ');
   {$ENDIF}