Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object and datasessions (again)
Message
 
To
21/07/1999 16:29:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00244270
Message ID:
00244537
Views:
13
>Unless I am missing something, it seems to search in the datsession in which it was created.


Alex is correct. My framework application object has numerous application wide functions (setting object level security, retrieving user settings from a resource file...). In cases where functionality needs to be applied to a private datasession, the datasessionid has be be provided in order to use SET DATASESSION TO prior to calling the oApplication.Method() This is generally accomplished by passing an object reference to the form with the private data session. If this isn't done, any SQL result sets or tables that are USEd are opened in Data Session 1 (Default Session) vice the PD. DS1 is the data session that the object was created in and it apparently scopes to that data session. If an object is created from a form with a private datasession, the new object scopes to the private datasession.

I've found that it's necessary to use the following in these methods to allow the forms to release themselves properly

lnDS = SET('DATASESSION')
SET DATASESSION TO (loForm.DataSessionID)

fox around a little....

SET DATASESSION TO (lnDS)

HTH
Dan
St. Petersburg, FL

"I started out with nothing and I still have most of it left"
Previous
Reply
Map
View

Click here to load this message in the networking platform