PRB: Global MFC DAO Objects Cause AssertionsLast reviewed: August 7, 1997Article ID: Q145992 |
4.00 4.10
WINDOWS NT
kbprg kbprb kbcode
The information in this article applies to:
SYMPTOMSAn assertion can occur on line 729, 732, or 1314 of Daocore.cpp when you define an MFC DAO object that has its destructor called after the call to CWinApp::ExitInstance. This will happen when an MFC DAO object is defined globally or as a member of a global object (like an MFC application's CWinApp-derived object).
CAUSECWinApp::ExitInstance() closes all open DAO workspaces by calling AfxDaoTerm() and removes them from the global workspace map. In the destructors for MFC DAO objects such as CDaoDatabase and CDaoRecordset, MFC tries to remove the workspace objects again.
RESOLUTIONHere are two workarounds:
STATUSThis behavior is by design.
|
Additional reference words: recordset 4.00 4.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |