Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete empty tables
Message
From
23/02/2005 16:44:08
 
 
To
23/02/2005 11:11:44
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00989602
Message ID:
00989858
Views:
19
How about this?
SET DEFAULT TO GETDIR( )

LOCAL aFileList
DIMENSION aFileList(1)
ADIR(aFileList,"*.dbf")

IF ALEN(aFileList) < 2
   RETURN .F.
ENDIF

FOR i = 1 TO ALEN(aFileList, 1)

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

   IF (iRecords = 0)
      DELETE FILE (cTable)
   ENDIF
ENDFOR
Jim Philippi

quando omni flunkus moritati
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform