Browse Source

+ fix for bug #7211

git-svn-id: trunk@4327 -
joost 19 years ago
parent
commit
d979196df0
1 changed files with 4 additions and 1 deletions
  1. 4 1
      fcl/db/bufdataset.inc

+ 4 - 1
fcl/db/bufdataset.inc

@@ -93,7 +93,10 @@ end;
 
 
 procedure TBufDataset.InternalFirst;
 procedure TBufDataset.InternalFirst;
 begin
 begin
-  FCurrentRecBuf := nil;
+// if FCurrentRecBuf = FLastRecBuf then the dataset is just opened and empty
+// in which case InternalFirst should do nothing (bug 7211)
+  if FCurrentRecBuf <> FLastRecBuf then
+    FCurrentRecBuf := nil;
 end;
 end;
 
 
 procedure TBufDataset.InternalLast;
 procedure TBufDataset.InternalLast;