Browse Source

* fixed the two issues in mantis 7366

git-svn-id: trunk@4809 -
joost 19 years ago
parent
commit
c0433eb4f2
2 changed files with 4 additions and 0 deletions
  1. 3 0
      fcl/db/bufdataset.inc
  2. 1 0
      fcl/db/dataset.inc

+ 3 - 0
fcl/db/bufdataset.inc

@@ -52,6 +52,9 @@ end;
 function TBufDataset.AllocRecordBuffer: PChar;
 begin
   result := AllocMem(FRecordsize + sizeof(TBufBookmark));
+// The records are initialised, or else the fields of an empty, just-opened dataset
+// are not null
+  InitRecord(result);
 end;
 
 procedure TBufDataset.FreeRecordBuffer(var Buffer: PChar);

+ 1 - 0
fcl/db/dataset.inc

@@ -1160,6 +1160,7 @@ begin
       FEOF := true;
       FBOF := true;
       FRecordcount := 0;
+      InitRecord(ActiveBuffer);
       SetState(dsBrowse);
       DataEvent(deDatasetChange,0);
       end