Searching a Database in Delphi

Posted by Neil on June 18, 2001

ok i have a Delphi database program that has 5 fields of info in each record.

How would i make a search thing so i have the user select 1 of the fields from a radiobox and it will show the whole record in the 5 editboxes?

 

Re: Jean Claude Servaye on June 18, 2001

1.- create a index on each of the 5 fields,
2.- when the user select a field to search on, select the right index,
3.- do the search with table1.findkey([edit1.text]);
4.- uses DBEdit to display the result.