Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic datasession
Message
From
05/09/2008 13:58:28
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01344882
Message ID:
01345221
Views:
13
Hi Bob

>How is what your doing different than just setting to a default datasession?

I've added rules to my form class. If the form is called from the menu it uses a private data session. If it is called from another form as either a picklist form or a child form, it should adopt the calling form's data session id. That's how it is "dynamic" IMO.

>
>The issues I referenced are when you try to work in several datasessions within a form. and most of those issues are tied to things that are scoped to datasessions.

Those are all manageable. The warnings over the years seem to suggest just changing datasession is problematic.

>
>Bob
>
>>>Hi all,
>>>I was wondering if it is possible to change the datasession in a form from default to private
>>>depending on where it was called from?
>>>Thanks.
>>
>>I've been doing dynamic data session forms for many years now. There have been none of the widely (almost mythical) reported unexpected results, but that may be due to how I'm doing it. Without all the conditionals, subclasses and error handling, I'm basically doing this in my form class Load so the datasession is already setup for opening cursors.
>>
>>
LOCAL loCallingForm
>>loCallingForm = _Screen.ActiveForm
>>SET DATASESSIONID TO m.loCallingForm.DataSessionID
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform