Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasession conflict
Message
From
08/11/2018 13:34:46
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01663173
Message ID:
01663211
Views:
48
Forms with private dataSession (.dataSession = 2) create a new dataSession of their own before dataEnvironment is loaded; more exactly get a new dataSession created from VFP, obtain a handle to it (.dataSessionID) and, before executing any code within, SET DATASESSION TO (this.dataSessionID)

However you have no more control on .dataSessionID than you have on a file handle.

>Hi Dragan,
>
>Thanks for the guidance.
>
>How changing the source code would be tricky at this point, I'm still looking for an alternative.
>
>Looking at the VFP HELP I saw that the DatasessionID property is read / write at run time.
>
>It also says:
>
>"Changing the DataSessionID property setting increments the reference count of the data session changed to and decrements the reference count of the data session changed from."
>
>"However, if you create a data session by setting the DataSession property to 2 (Private data session), changing the DataSessionID property setting does not release the initial data session. In such case, the object must be released to the initial session"
>
>This made me think that there is some way to manipulate the DataSessionID even at the risk of losing the datasources of the object, as the help says:
>
>"Changing the DataSessionID property of an object that contains data-bound controls causes the controls to lose their original data sources." In general, use DataSessionID on objects that do not contain data-bound controls. "
>
>Am I missing something here?
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Reply
Map
View

Click here to load this message in the networking platform