LOCAL oObj oObj = CREATEOBJECT("MainClass") oObj.ChangeDataSession() oObj.Release() RETURN ****** DEFINE CLASS MainClass AS Custom Ro_CustomClass = .NULL. Ro_SessionClass = .NULL. ******* PROCEDURE Init WITH This This.Ro_SessionClass = CREATEOBJECT("SessionClass") && Ex. Data Object This.Ro_CustomClass = CREATEOBJECT("CustomClass") && Ex. Business Layer Object *-Manually Setting the Session to that of the Session Class *-We do this so that data opened in a session class can be displayed in any form that we open SET DATASESSION TO (This.Ro_SessionClass.Rn_DataSession) ENDWITH ENDPROC ******* PROCEDURE ChangeDataSession DEBUGOUT "MainClass.ChangeDataSession #1 - DS=>" + ALLTRIM(STR(SET("DATASESSION"))) + " s/b=> 2" *-Change the data session in a Child Custom Class. Since the parent class is not *- a Session, and the child class is not a session, the datasession should remain as DataSession 1 *- on the return. However, it does not. It switches back to DataSession #2 on the return. This.Ro_CustomClass.ChangeDataSession() DEBUGOUT "MainClass.ChangeDataSession #2 - DS=>" + ALLTRIM(STR(SET("DATASESSION"))) + " s/b=> 1" ENDPROC ******** PROCEDURE Release This.Ro_SessionClass = .NULL. This.Ro_CustomClass = .NULL. ENDPROC ENDDEFINE ************ DEFINE CLASS CustomClass AS Custom ******* PROCEDURE ChangeDataSession SET DATASESSION TO 1 DEBUGOUT "CustomClass.ChangeDataSession- DS=" + ALLTRIM(STR(SET("DATASESSION"))) + " s/b=>1" ENDPROC ENDDEFINE ********* DEFINE CLASS SessionClass AS Session Rn_DataSession = 0 ******** PROCEDURE Init This.Rn_DataSession = SET("DATASESSION") ENDPROC ENDDEFINE