Page 1 of 1

What is wrong with this statement?

Posted: Wed 27 Jun 2007 01:34
by ccmcbride
function FindRec(aTable : tmsTable; const aKey : string; aField : string = 'UID') : boolean;
begin
if aTable.FieldByName(aField).AsString aKey then
result := aTable.Locate(aField, Variant(aKey), [foCaseInsensitive, foNoPartialCompare]) --> 'There is no overloaded version of 'locate' that be called with these parameters

else
result := true;
end;

Posted: Wed 27 Jun 2007 08:23
by Antaeus
You provided a wrong value to the Options parameter. It is of the TLocateOption type, and accepts only loCaseInsensitive and loPartialKey values.
You can find an example in the TMemDataSet.Locate topic of SDAC help.