Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 To: Igien Manlugon
  Where is Igien Manlugon?
 Manila
 Philippines
 Igien Manlugon
 Tags
Subject: RE: closing tables
Thread ID: 33714 Message ID: 33715 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Tuesday, December 02, 2003 10:24:51 AM         
   


> Hi all!
>
> I want to close all current open tables except one of them. Is there a short code I can use other than closing it one by one?
> example :
> following tables are all open : employee.dbf, shift.dbf,dysched.dbf,category.dbf,printlog.dbf and so on...
> What short code i can used to close all above dbf except printlog.dbf other than selecting and closing each of them one by
> one?
>
> Please help!
>
> Thanks,
>
> Igien78

You have a few options, including:
lnMax = AUSED(laTables)
FOR lnCount = 1 TO lnMax
	IF laTables[lnCount] # "PRINTLOG"
		USE IN SELECT(laTables[lnCount])
	ENDIF
ENDFOR

Or this two liner (quick and dirty code)
CLOSE TABLES ALL
USE printlog

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts

ENTIRE THREAD

closing tables Posted by Igien Manlugon @ 12/2/2003 10:05:52 AM
RE: closing tables Posted by Eric den Doop @ 12/2/2003 10:24:51 AM