Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing table in dataenvironment
Message
De
01/04/2002 12:58:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00612050
Message ID:
00639546
Vues:
24
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform