Article ID: 153897
Article Last Modified on 12/1/2003
APPLIES TO
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Data Access Components 2.5
This article was previously published under Q153897
SYMPTOMS
An application intermittently crashes on exit and an error similar to the
following appears:
<application> caused an invalid page fault in
module KERNEL32.DLL at 0137:bff9a07c.
This behavior occurs when the application is using the MFC DAO classes,
the MFC ODBC classes, or the ODBC API to access a database using the Jet
Database Engine.
RESOLUTION
Call the LoadLibrary() function on the Jet Engine as shown in the
sample code below. This call needs to be done only once during execution
of the program. To minimize any adverse affect on performance, call
LoadLibrary() only after the database has been opened. Do not call
FreeLibrary() for this DLL. The DLL will be automatically unloaded when the
application exits.
This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0. If
you are using the ODBC, you can simply use the newer ODBC driver that is
available with Visual C++ 5.0. If you are using DAO, you need to build your
application using Visual C++ 5.0 to use DAO 3.5. The earlier MFC classes
use DAO/Jet 3.0 and do not recognize DAO 3.5.
STATUS
This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0.
Keywords: kbbug kbfix kbinterop kbdatabase kbprogramming kbvc500fix kbprb KB153897