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