Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Terminating a Private Data dession
Message
 
 
To
10/05/2001 21:00:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00506073
Message ID:
00506465
Views:
19
>Hi -
>I have initiated a private data session by defining a class as a session in a NEWOBJECT(). I used the document http://support.microsoft.com/support/kb/articles/Q248/1/16.asp as a reference guide. However how would I terminate this session?
>
>Do I remove the object ?
>
>Thanks,
>
>Larry

Here is some simplified code from my PRG class:
#INCLUDE Defaults.h

DEFINE CLASS NewSession AS Session
   PROTECTED PROCEDURE Init
      SET TALK OFF
      SET EXCLUSIVE OFF
      SET MULTILOCKS ON
      SET DELETED ON
      SET SAFETY OFF
      SET CENTURY ON
      SET DATABASE TO DATABASE_NAME
      *!* DATABASE_NAME is a constant in my defaults.h constants file
      if not This.PostInit()
         return .f.
      endif
   ENDPROC
   PROCEDURE PostInit
       *!* for use by subclasses of this class instead of using the Init
   ENDPROC
   PROCEDURE mCloseTables
      Close Tables All
   ENDPROC
   PROCEDURE Release
      RELEASE This
   ENDPROC
   PROTECTED PROCEDURE Destroy
      This.PreDestroy()
      This.mCloseTables()
   ENDPROC
   PROCEDURE PreDestroy
       *!* for use by subclasses of this class instead of using the Destroy
   ENDPROC
ENDDEFINE
All I have to do to use it is:
oSession = newobject('NewSession', 'UDC.FXP')
with oSession
     *!* do whatever here
endwith
oSession.Release()
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform