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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Partial strings search in Delphi

Status
Not open for further replies.

ukusa

Programmer
Oct 8, 2001
49
AU
Using Delphi 5... IS there any way to locate for example "myt" in "Smyth" when using a filter or locate? Delphi project is using Paradox tables and filter only allows partial provided that you start from the first letter eg: "Smy*". * is to tell Delphi to ignore the rest when compaing. The users of of Paradox equal like to put in bits of surnames regardless where they are in the name. The condition to this is to be able to FIND NEXT or PREVIOUS using that ability.

Thanks
Allen Crisell
 
You could use a query, and use the like operator -
select * from table where field like '%myt%'

Good luck!
TealWren
 
Locate will allow you to do a partial match on the string. It will only work if the string you are looking for is the beginning of the key.

using [loPartialKey] as an locate option should allow you to find the first match. You second option is to make your own OnFilter event to determine if the record matchs

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top