>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"