Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about SEEK
Message
De
16/01/2006 09:55:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
16/01/2006 09:41:05
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01087137
Message ID:
01087150
Vues:
11
>Hello,
>I am using SEEK on a cursor. My question is when I perform this SEEK, does it always start at the first record of the cursor, or do I manually have to issue a GO TOP if I am doing the SEEK in a loop?

SEEK is quite different to LOCATE. LOCATE can start either from the beginning or from the current position, depending on the options. SEEK doesn't even have an option - it does a binary (tree) search on the entire index. Nor do you have the option to CONTINUE (go to next record that specifies the criteria), but since the records are already in order (because of the index selected), you can use SKIP and see if the next record still matches your criteria.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform