Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasession manual closing
Message
From
14/01/2003 11:52:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00741490
Message ID:
00741506
Views:
22
This message has been marked as the solution to the initial question of the thread.
>How can I force the closing of a private datasession. I have reviewed previous threads and can’t find an easy answer. I can close all objects in the datasession but this will not help. Thanks in advance for your feedback.
*VFP7
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
Is working for me.
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
Next
Reply
Map
View

Click here to load this message in the networking platform