I execute the following code in Delphi:
MyClientDataSet.IndexFieldNames:='FIELD1;FIELD2;FIELD3'
And I can see that MyClientDataSet.RecordCount shows reduced number of records while this temporary index is active. If I make the while loop:
while not MyClientDataSet.Eof do begin
//... some code
MyClientDataSet.Next;
end;
then only part of the records are visited in this loop while the temporary index is active. Records are lost without any specific order: some of the lost records can have nil values in their indexed fields and some of the lost records have all fields with values. Is such behavior by design or I have discovered some ClientDataSet bug (maybe dependent upon some specific version of midas.dll library) or I need to configure my TClientDataSet in some specific way (I can not imagine - how)?
I am working with Delphi 6 but I guess that the problem can be in later Delphi versions as well.