Browse Source

TCustomBufDataset: set PacketRecords to 1 only on a UniDirectional dataset

git-svn-id: trunk@44633 -
ondrej 5 years ago
parent
commit
e08d8bba82
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

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