Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about SEEK
Message
From
16/01/2006 09:55:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/01/2006 09:41:05
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01087137
Message ID:
01087150
Views:
10
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform