Re: Unhandled errors; public vars/classes lose scope??



robert.waters wrote:
Why do my public variables (including class instances) disappear when
my app experiences an unhandled error?

My custom class module's class_terminate event doesn't even fire, the
instance just goes out of scope/gets garbage collected/disappears into
thin air.

Does anyone know why Access behaves in this manner, or more
importantly how to change that behavior?

FYI I am using an AutoExec macro to call a public function (in a
module) that creates an instance of a custom class (to keep track of
session data) thusly:

Public Session As clsSession

Public Function SessionInit()

Set Session = New HDSession

End Sub

It's always been that way. MDE's don't do this however.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • Unhandled errors; public vars/classes lose scope??
    ... My custom class module's class_terminate event doesn't even fire, ... Public Session As clsSession ... Public Function SessionInit() ...
    (comp.databases.ms-access)
  • Re: PHP5 - Complete OO User/admin class
    ... public function login() { ... protected $session; ... echo "display admin menu..."; ... public function __construct( ...
    (php.general)
  • Re: Multithreaded COM DLL
    ... Thanx Craig. ... the procedures are already included in an OlePublic custom class ... How would I incorporate this class into the session? ...
    (microsoft.public.fox.programmer.exchange)
  • RE: [PHP] Storing objects in sessions recursively
    ... are you sure you did not forget a include of the Article source code? ... You need all sources codes aiavlable when getting the object back from the session. ... storing an array in an array. ... public function setCurrentArticle ...
    (php.general)
  • Re: Multithreaded COM DLL
    ... You'll need to copy and paste the code from the custom class into the ... > How would I incorporate this class into the session? ... > "Craig Berntson" wrote in message ... CrysDev: A Developer's Guide to Integrating Crystal Reports ...
    (microsoft.public.fox.programmer.exchange)

Loading