Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic datasession
Message
From
05/09/2008 06:47:27
 
 
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:
01345079
Views:
17
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?


It seems to me that there are occassions where you want a form to share the data session of some calling form. If this is what you are trying to do, set the child form's data session to 2-Private DataSession and when it needs to share the data session of some calling form, just pass the caller's DataSessionID to the child form in its Init(). Then you can you code like this in the child form's Init() to change the DataSession in which it is operating:
LPARAMETERS tnDS_id

IF NOT EMPTY( tnDS_id )
  SET DATASESSION TO tnDS_id 
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform