locate method problem ???



Delphi 7
trying to use ADO Dataset without connection reading prevously stored XML
file from disk
The error that pos up is EOleException "Element was not closed".

Please help me to solve this I just do not understand the reason.

Code Fragment:

Var
OldDataset:TADODataset;
mn: TStringList;
Begin
OLDDataset:=TADODataset.Create(nil);
mn:=TStringList.Create;
try
OldDataset.LoadFromFile(LocalFile);
mn.Delimiter:=';';
mn.DelimitedText:=Params.Values['primarykey']; //
('2006','2008','389k','400k') thats the values
if
OldDataset.Locate(params.Values['primarykey'],VarArrayFromStrings(mn),[])
then OldDataset.Delete; //** here where the error happens
{........more code here........}
finally
OLDDataset.free;
mn.free;
end

End


.