Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Go lnRec
Message
From
15/11/2004 17:11:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
15/11/2004 17:01:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00961543
Message ID:
00961545
Views:
8
>Hello all.
>My co-worker and I have a bet that we would like for you all to help settle.
>
>When "Go MyRecordNo" is issued, is there an internal index at work to find the record?
>
>Thanks.

No, why should it? If VFP has the record number, it can go directly to the record. No need to do complicated searches for it.

The record number isn't data which is stored anywhere; it just indicates the record position. For instance, let's say (to simplify the calculations) that the table header uses up 1000 bytes, and each record uses 100 bytes.

Then, record #1 starts at position 1001, record #2 at position 1101, record #3 at position #1201, etc.

I will leave it as an exercise to figure out the general formula, but you get the idea. Visual FoxPro uses fixed-length records, and therefore, it can find the file position immediately if it knows the record number.
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
Next
Reply
Map
View

Click here to load this message in the networking platform