Gar,
>The exact command that failed is SET DATASESSION TO (lnSavedataSession)
>(lnSaveDataSession is not set.)
>
>It was called from just2.oenvironment.osessionevironment.set
Although I'm not sure what's happening to your form, here's some information that may help...
All form classes in the Framework contain a "SessionEnvironment" object. When the form instantiates, the SessionEnvironment object calls up to a global instance of SessionEnvironment to retrieve any "application-wide" default session settings. When it does this, it passes its current data session number to just2.oenvironment.osessionenvironment.set().
I recommend setting a breakpoint in your form's SessionEnvironment object's Set() method as follows, and tracing through code:
SET STEP ON
DODEFAULT()
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com