The information in this article applies to:
SYMPTOMS
MFC DLLs and OCXs that use DAO need to call AfxDaoTerm() to terminate DAO
before their ExitInstance() function is called. MFC, by default, calls
AfxDaoTerm() from within CWinApp::ExitInstance(). RESOLUTION
MFC keeps an internal object lock count of automation objects in the module
state. The constructor of each object exposed by the automation server
calls AfxOleLockApp() to increment this count and calls AfxOleUnlockApp()
to decrement it.
Add the following code to terminate DAO when no automation objects are
in use any longer:
STATUSThis behavior is by design. REFERENCESFor more information, please refer to the following articles in the Microsoft Knowledge Base: Q143084 FIX: Problems with Using the MFC DAO Classes in a .DLL or .OCX Q149889 PRB: Assertion or Problems Using DAO in a DLL Additional query words:
Keywords : kbprg kbDAO kbDatabase kbMFC kbVC kbVC400 kbVC410 kbVC420 kbVC500 |
Last Reviewed: July 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |