Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maintaining data session state
Message
From
21/09/2002 18:45:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Maintaining data session state
Miscellaneous
Thread ID:
00703118
Message ID:
00703118
Views:
47
Given the following code:
loTest=CREATEOBJECT('Test')
MESSAGEBOX('Data session after having created Test: '+STR(SET('DATASESSION')))

loPrivateData=CREATEOBJECT('PrivateData')
SET DATASESSION TO loPrivateData.DataSessionID
MESSAGEBOX('Data session now switched to 2: '+STR(SET('DATASESSION')))

loTest.Go()

DEFINE CLASS Test AS Custom
FUNCTION GO
MESSAGEBOX('Data session inside method is switched back to 1: '+STR(SET('DATASESSION')))
ENDFUNC
ENDDEFINE

DEFINE CLASS PrivateData AS Session
ENDDEFINE
Can someone explain me why calling a method from the Test object resets the data session to 1? We are sitting on data session 2 when calling that method. Why it is resetting itself to 1?

I need to maintain the data session state. How can I make that work?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform