Location of the current record changes after SortOn on kbmMemTable 7.91

Home Forums kbmMemTable Location of the current record changes after SortOn on kbmMemTable 7.91

Viewing 1 reply thread
  • Author
    Posts
    • #55607
      Hiroaki Kitahata
      Participant

      There is a problem that the location of the current record changes after SortOn execution with version 7.91 / 7.91.10.
      It can be checked by the following code.
      All 100s are shown to indication of ShowMessage in version 7.86.
      But the non 100s are indicated by the problem version.

      procedure test;
      var tbl: TkbmMemTable;
      i:integer;
      begin
      tbl := TkbmMemTable.Create(self);
      try
      tbl.FieldDefs.Add(‘Fld1’, ftInteger);
      tbl.FieldDefs.Add(‘Fld2’, ftInteger);
      tbl.FieldDefs.Add(‘Fld3’, ftInteger);
      tbl.open;
      for i := 1 to 100 do begin
      tbl.Append;
      tbl.FieldByName(‘Fld1’).AsInteger := i;
      tbl.FieldByName(‘Fld2’).AsInteger := Random(100);
      tbl.FieldByName(‘Fld3’).AsInteger := Random(100);
      tbl.Post;
      end;
      tbl.Last;

      tbl.SortOn(‘Fld2’, []);
      ShowMessage(tbl.FieldByName(‘Fld1’).AsString);

      tbl.SortOn(‘Fld3’, []);
      ShowMessage(tbl.FieldByName(‘Fld1’).AsString);

      tbl.SortOn(‘Fld2’, []);
      ShowMessage(tbl.FieldByName(‘Fld1’).AsString);

      tbl.SortOn(‘Fld3’, []);
      ShowMessage(tbl.FieldByName(‘Fld1’).AsString);

      tbl.SortOn(‘Fld2’, []);
      ShowMessage(tbl.FieldByName(‘Fld1’).AsString);

      tbl.SortOn(‘Fld3’, []);
      ShowMessage(tbl.FieldByName(‘Fld1’).AsString);

      tbl.Close;

      finally
      tbl.free;
      end;
      end;

    • #55615
      kimbomadsen
      Keymaster

      Hi,

      Thank you for your bugreport.

      It is fixed in 7.92.00 just released.

      /Kim

Viewing 1 reply thread
  • You must be logged in to reply to this topic.