Browse Source

TCustomBufDataset: set PacketRecords to 1 only on a UniDirectional dataset

git-svn-id: trunk@44633 -
(cherry picked from commit e08d8bba82aaa9ce9e00fdb4eaff6e7d65c12e45)
ondrej 5 years ago
parent
commit
6c765aa9ab
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/fcl-db/src/base/bufdataset.pas

+ 2 - 1
packages/fcl-db/src/base/bufdataset.pas

@@ -2013,7 +2013,8 @@ begin
     begin
     begin
     SetUniDirectional(AValue);
     SetUniDirectional(AValue);
     ClearIndexes;
     ClearIndexes;
-    FPacketRecords := 1; // temporary
+    if IsUniDirectional then
+      FPacketRecords := 1; // UniDirectional dataset does not allow FPacketRecords<0
     end;
     end;
 end;
 end;