Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to TOUCH a DBF without changing data?
Message
De
18/12/2006 18:03:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01178674
Message ID:
01178745
Vues:
14
>Is there a way more efficient than this (assuming no records are marked for deletion in normal use, and that if zero records, then there is not need for the TOUCH)?
>USE XXXX
>If RECC()>0
>  GOTO 1
>  DELETE
>  RECALL
>ENDIF
>USE
>
>Thanks!

The safest, I would say, is to write a small utility program using LLFF. This should work for tables with and without records, it should work reasonably fast even if the table starts with hundreds of deleted records, and you can re-use it for files other than DBF.

However, in the case of a table, you may have to touch the DBF, CDX and (if there is one) the FPT files - unless just changing the main file is enough for your needs.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform