I guess you've got your "database stuff" in another unit. Just add, "DB" to the uses clause. the following are there ...
TLocateOption = (loCaseInsensitive, loPartialKey);
TLocateOptions = set of TLocateOption;
loCaseInsensitive means:
'AAAA' is the same as 'AaAa' or 'aaaa' etc.
loPartialKey means:
find the first which matches however much of the value you pass.
So if you have a file with people's names
Doe, John
Gibson, Henry
Smith, Mary
Smith, Yolanda
and you try to locate "Smith", it will find "Smith, Mary". If you don't use loPartialKey, it won't find either of the Smiths.
If you use both loCaseInsensitive and loPartialKey and you try to locate "SMITH, y", it will find "Smith, Yolanda"
HTH,
Doug