Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing table in dataenvironment
Message
From
01/04/2002 12:58:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00612050
Message ID:
00639546
Views:
23
>Do you know of a good global way to close all tables in all datasessions? In my VFP7 IDE I need a good way to roll-back everything and close out everything so I can start fresh.
>
>Thanks.
LOCAL oObj, lnSessions, ix
FOR EACH m.oObj IN application.Objects
	IF pemstatus(m.oObj,'baseclass',5) AND LOWER(m.oObj.Baseclass) = 'form'
		IF PEMSTATUS(m.oObj,"Dataenvironment",5)
			m.oObj.Dataenvironment.CloseTables
		endif
	ENDIF
	m.oObj = .null.
ENDFOR
lnSessions = ASESSIONS(arrSession)
FOR m.ix=1 TO m.lnSessions
	SET DATASESSION TO arrSession[m.ix]
	CLOSE DATABASES all
endfor
SET DATASESSION TO thisform.DataSessionId
CLOSE DATABASES all
According to documentation 'Close data all' should do it in one step but probably I interpret what writes there wrong.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform