Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Session object problems
Message
From
31/05/2004 15:28:06
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Session object problems
Miscellaneous
Thread ID:
00908741
Message ID:
00908741
Views:
44
Hello all,

Using VFP6, I have a non-visual custom class that instantiates another non-visual session object. In a form with a private datasession, I need to instantiate the custom class with it's own, private, session. When I do so, it remains in the form's session. For example, in a method on the form I have...

o=CreateObject('CustomClass')

and in my CustomClass.Init method I have

this.AddObject('MyCustomSession')

However, it uses the form's session when I open the tables open in the CustomSession's init. Also, if I just instantiate the custom class from the command prompt, it just uses the default datasession. So if I instantiate it twice...
o1=CreateObject('CustomClass')
o2=CreateObject('CustomClass')

It errors out because both are using the default session. What am I doing wrong?
TIA
L.A.Long
ProgRes
lalong1@charter.net
Next
Reply
Map
View

Click here to load this message in the networking platform