Alright, browsing the forum I found about the ‘SortOn’ method, which lead me to (hopefully) the correct solution to our previous non functional code.
We’d still need to modify the code, but with no performance inpact.
procedure TForm1.Button2Click(Sender: TObject);
var a: TkbmIndex;
begin
// kbmMemTable1.SortOn(‘ID;NAME’, [mtcoCaseInsensitive]);
a := kbmMemTable1.AddIndex(‘idx1’, ‘ID;NAME’, [ixCaseInsensitive]);
a.Rebuild;
kbmMemTable1.SwitchToIndex(a);
// kbmMemTable1.IndexDefs.Add(‘idx1’, ‘ID;NAME’, [ixCaseInsensitive]);
// kbmMemTable1.CreateIndexes;
// kbmMemTable1.IndexName := ‘idx1’;
end;
Thanks in advance.