Browse Source

+ Fixed TBufDataset.First (bug 5068)

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

+ 2 - 1
fcl/db/bufdataset.inc

@@ -90,7 +90,7 @@ end;
 
 
 procedure TBufDataset.InternalFirst;
 procedure TBufDataset.InternalFirst;
 begin
 begin
-  FCurrentRecBuf := FFirstRecBuf;
+  FCurrentRecBuf := nil;
 end;
 end;
 
 
 procedure TBufDataset.InternalLast;
 procedure TBufDataset.InternalLast;
@@ -138,6 +138,7 @@ begin
         begin
         begin
         if getnextpacket = 0 then result := grEOF;
         if getnextpacket = 0 then result := grEOF;
         end
         end
+      else if FCurrentRecBuf = nil then FCurrentRecBuf := FFirstRecBuf
       else if (PBufRecLinkItem(FCurrentRecBuf)^.next = FLastRecBuf) then
       else if (PBufRecLinkItem(FCurrentRecBuf)^.next = FLastRecBuf) then
         begin
         begin
         if getnextpacket > 0 then
         if getnextpacket > 0 then