Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Go lnRec
Message
De
15/11/2004 17:11:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
15/11/2004 17:01:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00961543
Message ID:
00961545
Vues:
9
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform