Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SEEKs that don't match.
Message
From
31/12/1997 15:34:25
Eric Sedlacek
TTSS Interactive Products
Rockville, Maryland, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SEEKs that don't match.
Miscellaneous
Thread ID:
00068694
Message ID:
00068694
Views:
75
Does anyone know how to do the equivalent of a SEEK which if there is no match places the record pointer to the position where that value would go (under the current index of course)?

Here's an example. Take the following single field indexed table:
AA
AB
BG
GG

If I do a SEEK "AC", the record pointer will go to EOF since there is no record containing "AC". But what I want is for it to go to the record containing "BG" since that is where one would find "AC" in the file if it existed.

Am I making myself clear? I hope so. I wrote a routine that implements a binary search, but that is pretty slow since it had to use a lot of SKIP statements (and "SKIP 12567" does not execute instantly!). I'm just hoping that there is a command that I missed.

It is not a completely necessary feature for my app, but I thought it would be helpful for users who may not know exactly how to spell what they are typing.

Thanks. And Happy New Year.
Next
Reply
Map
View

Click here to load this message in the networking platform