Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert after
Message
 
To
26/04/2002 00:59:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00649475
Message ID:
00649582
Views:
10
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform