Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasession conflict
Message
From
08/11/2018 13:30:33
 
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:
01663210
Views:
55
Well datasessions are like work areas, you should never take the number (ID) for granted

As Dragan suggested, you should store the datasessionID into a variable or _screen.property before switching, and later restore to this value:
local liDS
liDS = set('DataSession')
set datasession to another
do someStuff
set datasession to m.liDS
>Hi Thierry,
>
>The problem occurs in the development environment.
>
>My application initially opens 3 DATASESSIONS, which are automatically identified by VFP with IDs 2, 3 and 4.
>
>From there, I always refer to the DATASESSIONS directly in the code, for example:
>SET DATASESSION TO 2 or SET DATASESSION TO 3, etc.
>
>Since I'm starting to use THOR, I'm experiencing a conflict in the DATASESSIONS IDs.
>
>In the development environment, when THOR is active, it creates a DATASESSION with ID = 3 and from there, when I call my application for debugging from within the same development environment, my DATASESSIONs are automatically identified by the VFP with the IDs 2, 4 and 5.
>
>So, my references of DATASESSIONS IDs are changed.
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