Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete empty tables
Message
De
23/02/2005 10:48:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
23/02/2005 10:43:36
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:
00989640
Vues:
19
Since you are working with a single table, there is no need for the "IN 0". Just SELECT 0 once, and then work with the current work area.
FOR i = 1 TO ALEN(aFileList, 1)

   select 0
   cTable = aFileList[i, 1]
   USE (cTable)
   iRecords = RECCOUNT()
   USE

   IF (iRecords = 0)
      DELETE FILE ("d:\ahsan\TEMP\" + cTable)
   ENDIF
>ENDFOR
Another option is to USE ... ALIAS TempTable, and then, USE IN TempTable.
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