Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleted records
Message
De
25/01/2003 17:07:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
25/01/2003 16:27:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00745433
Message ID:
00745456
Vues:
18
>Dennis,
>
>There is no way to physically remove them, besides performing a pack, or copying the records to a new table. Physically removing records every time one is deleted would be a very inefficient operation...in reality it would require rewriting all records after the delete point.

I don't agree that it would "require rewriting all records after the delete point", not for fixed-sized records. Say you have 1000 records, and you want to delete record #500. It would be possible to copy record #1000 to position #500, and then adjust both the file size and the reccount() part of the header.

Note that a) This wouldn't work for memo fields, and b) Users are accustomed to have the possibility of seeing records in the order they were created. This wouldn't be possible with the above algorithm. And of course, you could no longer use recno() as the primary key (which isn't recommended anyway).

Hilmar.
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