TSQLQuery has no means to clear indexes after a sort has been performed.
Original Reporter info from Mantis: snorkel
-
Reporter name:
Original Reporter info from Mantis: snorkel
- Reporter name:
Description:
TSQLQuery and hence TCustomBufDataset has no way to clear added indexes when sorting. I added the following public procedure to fix the issue:
procedure TCustomBufDataset.ClearIndexes;
var
i:integer;
begin
For I:=0 to Length(FIndexes)-1 do
FreeAndNil(Findexes[I]);
SetLength(FIndexes,0);
FIndexesCount:=0;
end;
Steps to reproduce:
Add indexes to sort columns, then change the SQL and a error is raised that
the field used in the old index cannot be found.
Mantis conversion info:
- Mantis ID: 24110
- Version: 2.6.2
- Fixed in version: 3.0.0
- Fixed in revision: 26719 (#f59a2272)
- Target version: 3.0.0