Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set order / private datasession
Message
 
 
To
14/11/2001 10:20:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00581452
Message ID:
00581522
Views:
22
>>As far as I know, if you run your function from a form (say, command button), this function already operates within Private Form's DS, so you don't need to do anything special.
>
>Yes, this is my experience, too.
>
>>Otherwise you can pass Form's DS as a parameter. My colleagues use SET DATASESSION to lnPassedDS lots of times in a code without problems...
>
>Thanks; the "without problems" is the part that interested me.
>
>Instead of a parameter, I plan to get .DataSessionId, from _vfp.ActiveForm. You see, the reason I want an outside function in the first place is because I want to have a generic function called from a menu. So, I can't pass a parameter from the form.
>
>Hilmar.

Yes, I think it will work. Just be careful, don't forget to save it prior to changing and restore at the end, also don't overwrite currently opened aliases (e.g. create cursor command should be preceeded with select 0, we had this problem with one of our applications, which didn't have this command and so screwed up the currently running form's DS).
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform