#INCLUDE DEFAULTS.H if !dbused(DATABASE_NAME) open data DATABASE_NAME endif if type("oApp") = "O" && even numbered calls to PRG release the objects oApp.Release() && This also releases the Oracle Login Private DS oAppParms.Release() release oApp, oAppParms wait window nowait "Objects released. Environment reset and cleared." return endif set talk off public oApp, oAppParms && in actual APP, these are PRIVATE oApp = newobject("Appmgr", ".\Classes\AppManager") oAppParms = NewObject("SetParams", ".\Classes\AppManager") oAppParms.Set_Carry = "OFF" oAppParms.Set_Century = "ON" oAppParms.Set_Confirm = "OFF" oAppParms.Set_Database_To = DATABASE_NAME oAppParms.Set_Deleted = "ON" oAppParms.Set_Exact = "OFF" oAppParms.Set_Exclusive = "OFF" oAppParms.Set_Hours_To = 24 oAppParms.Set_Multilocks = "ON" oAppParms.Set_Near = "OFF" oAppParms.Set_Safety = "OFF" oAppParms.Set_Seconds = "ON" oAppParms.Set_Talk = "OFF" oAppParms.Set_Unique = "OFF" oApp.App_LoginID = "MMCCASLA" set database to DATABASE_NAME oLogin = newobject('Login', '.\Classes\AppManager') oLogin.mLogin() *-- mLogin creates a private DS using Session class and connects *-- to Oracle via a remote view using a shared connection. The *-- method also adds an oApp.oLoginSession property that stores *-- an object reference to the Session so it can be released by *-- oApp when oApp is released. oLogin.Release() release oLogin returnAll my forms that use a private DS use the oAppParms.Set_xxxx values in the form's LOAD method. This code is obviously in my form baseclase. So, I just change whatever SET_xxx property before my oApp.DoForm() and set it back to the default after the oApp.DoForm().