Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert after
Message
 
À
26/04/2002 00:59:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00649475
Message ID:
00649582
Vues:
11
Pasculescu,

As the others have said, Insert After will work in VFP. However, if you think about how this command works you may decide that using an index to sequence you records is a much better approach. The algorythm for INSERT (xBase) is;
1. Copy all records up the insertion point to a temp file
2. add the new record to the temp file
3. copy all the rest of the records to the tmp file
4. Erase the original file
5. rename the temp file to the ooriginal name
6. recreate any indexes for the original file
It should be obvious that if the record count gets even moderate this will become and major performance bottle neck.

Compare that to using an index;
1. Add a record to the end of the fila
2. Update the indexes
Now you simply set the proper index in control and your records are in the order you want them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform