Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locate Options don't work 1

Status
Not open for further replies.

guava65

Programmer
Jul 20, 2001
238
US
I'm trying to use the LOCATE function for a to find records in a table and am not able to use the options [loPartialKey, loCaseInSensitive]. Each time I try, I get a compile error

[Error]line 197: Undeclared dentifier: 'loPartialKey'

my code looks like:

[tt]
procedure TfrmOwEd.SpeedButton2Click(Sender: TObject);
begin
if Table1.Locate('LastName', edit1.Text, [loPartialKey]) then
begin
ShowMessage('Record found');
edIT1.Text := '';
end;
[/tt]


Is there something I need to do to make the partialkey and caseinsensitive to work? The code works fine without the options but it stinks to have to know the full text and case in order to locate a record.

HELP! Mahalo,
cg
 
Ensure that your form/unit has the DB unit referenced in the uses clause at the top. The 'loPartialKey' requires use of the 'DB' unit. Sometimes Delphi puts it there on addition of the data components. Try this ?
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top