Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SEEKs that don't match.
Message
De
31/12/1997 15:34:25
Eric Sedlacek
TTSS Interactive Products
Rockville, Maryland, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SEEKs that don't match.
Divers
Thread ID:
00068694
Message ID:
00068694
Vues:
79
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform