Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek() with wildcards (*?)
Message
From
14/05/2001 11:46:26
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
 
 
To
14/05/2001 11:26:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00506837
Message ID:
00506855
Views:
19
>I am rewriting an application originally done in Access (by someone else). The application uses an Access filtering function were wildcards can be used to search for data. The client very often gets partial information fron the customer and has to search for container # "TEST12345MI" by using "*12345*". Is there a way to use wildcards with FoxPro seek(). I am probably going to do some kind of search using at() unless someone has a better suggestion. The filtering method being used in the Access application is very slow and I would like to improve the speed.

No, You can't SEEK in that case, but you could SEEK on "TEST123" if SET EXACT OFF. To offer the best speed, you might give the user a choice of "Begins with" and "Contains" using the fast seek for "Begins with".
Come to think of it you could support both options with a LOCATE. LOCATE will optimize if it can, resulting in search times approaching SEEK. And you can CONTINUE through additional matches.
One last thought. If it's common that your users will search for a container based on its number as in your example, you could create an index on just the number portion of the field. Then the user could SEEK on the number.
David.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform