Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running code in a separate session
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Running code in a separate session
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01084016
Message ID:
01084016
Views:
56
Hi everybody,

I have a class QueueProcess which is based on BusinessProcess class which in turn is based on cCustom class. I want the BusinessProcess class to run all its code in the separate session. In other words, when I instantiate my class it should not share current datasession (from the calling form or program), but run everything in its own. Since it's a custom class and not a session (I used custom in order to be able to create my class visually), I'm thinking about the following:

In the Init method of the BusinessProcess class do:

this.nOldSession = set("datasession")
this.oSession = createobject("PrivateDataSession")
set datasession to (this.oSession.SessionID)

And in the class destroy make

this.oSession = null
set datasession to (this.nOldSession)

Do you think it would work and achieve what I want? Do you have better ideas?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform