Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete empty tables
Message
De
23/02/2005 10:25:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
23/02/2005 10:06:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00989602
Message ID:
00989631
Vues:
17
That should work, but might be slow for large tables. For efficiency, I would suggest:
  • If empty records count as "records", simply check reccount().
  • Otherwise:
    locate
    llEmptyTable = eof()
    >
    USE Temp\TableA SHARED
    >COUNT TO lnRecCnt
    >USE
    >
    >IF lnRecCnt = 0
    >   DELETE FILE Temp\TableA.DBF
    >ENDIF
    HTH
    >DELETE FILE Temp\TableA.DBF>
    >This command will delete tableA, but how should findout this table has no records?
    >>I want delete only empty tables within directory called TEMP.
    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