Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching DataSession's
Message
From
13/12/2004 14:51:16
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
13/12/2004 11:48:24
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00968641
Message ID:
00968879
Views:
9
Hi Dragan,
You are living dangerously :-)
Not only does if have to be done at the method level, but at any method that those methods call. I advocate a different design. VFP does a good job of maintaining the right DS, even when you mouse about it switches to the 'right' DS.
I'm pretty sure that storing an object reference has no bearing on the way an object works. (Which is good.)


>The reason for this is that any object's code will execute in the datasession which was active when the object was created. So switching datasessions is OK, IMO - I'm doing it every day, it just needs to be done at the method level, or you have to create objects in the DS where you want them to execute.
>
>Now Dorin may be up to something... if just storing a reference to an already created object as a property of the current object, and then calling it using this reference makes it run in the caller's datasession... that'd be cool. I'll have to check that, sounds too good.
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform