Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching DataSession's
Message
From
13/12/2004 12:28:27
 
 
To
13/12/2004 11:48:24
Dragan Nedeljkovich (Online)
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:
00968804
Views:
8
hello Dragan

your suggestion with passing the ds id as a parameter would not have a different effect, because my code does find the correct ds id, that works fine, but it does not switch it (set ds to) - this portion does not work.

as to Dorin's idea, i though he ment just to instantiate a new (2nd) object on the form level, therfor it's already in the correct ds. but maybe i missunderstood him. i'll try his/your suggestion.

but i still would not be too crazy about it, because that would mean that i have to go through some code, find where oToolBox is called, see if this would be called from within a form (from a class attached to the form ie).

so unless i can get the 'set ds to' command to work, it looks like i got a mess on my hand - either way.



>I've seen a lot of code where the datasession is passed as a parameter... like this:
>
	procedure exec(nDS)
>n=set("datasession")
>set datasession to (nDS)
>{bla bla}
>set datasession to (n)
>return
>
>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform