Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert a blank record in the middle of a table
Message
De
21/04/2003 03:37:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00779686
Message ID:
00779690
Vues:
17
>I want to insert a blank record in the middle of a table (“append blank” appends a blank record at the end of the table). Does anybody know what the most efficient way is?
>

Ali, there used to be a command that worked something like INSERT BLANK BEFORE. The problem is that its very inefficient because VFP has to

a) copy all the records before the insertion point to a new file, then
b) add your new blank record, and then
c) add all the records after your insertion point, then
d) delete the original file, and then
e) rename the new file to the original name!

In other words this is a total copy of the file. This also requires exclusive access.

VFP help no longer supports this command although I am not sure if it actually still works (I'm using VFP7/8). However, it would not be difficult to create you own function to do this following the above steps.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform