Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DELETE command?
Message
De
19/01/2007 14:36:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/01/2007 13:44:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01187102
Message ID:
01187152
Vues:
30
>How can I delete and take out the data in my table.dbf? I have this code and it only marked the data to be deleted, but did not remove it. What am I missing?
>
>Please help.
>
>Thanks,
>Sam
>
>
>DELETE FROM testdata ;
>WHERE testdata.serialnum = m.lcSerialNum AND ;
>	testdata.testdatewrk = m.ldDateWrk
>
Deleted records stay in the table until you issue the PACK command. You should NOT do the PACK every time you delete, for the following reasons:
  • This is slow, and therefore inefficient - especially for large tables.
  • This will not work in multi-user environments, since you need exclusive access to the table.

    Instead, you should SET DELETED ON to hide deleted records. Do the PACK approximately once a month, when nobody is using the database.
    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