The information in this article applies to:
SYMPTOMSThread Safety with Jet has been achieved with the release of DAO 3.5, but only for applications built with the _UNICODE switch. To use DAO 3.5 in a multi-threaded environment you need to use a class library (or other access mechanism) that is also thread-safe. Visual C++ offers two class libraries that use DAO 3.5: MFC DAO and the DAO SDK. Only the DAO SDK is itself thread-safe and therefore can use DAO 3.5 in a multi-threaded environment. CAUSE
The Jet engine was originally written as a stand-alone desktop application,
and originally conceived before thread-safety was as important as it is
today. Jet 3.5 itself is not thread-safe. However DAO 3.5 can implement
thread-safety using Jet 3.5 within an apartment model, but only if your
application is compiled with the _UNICODE switch and using the UNICODE
version of the DAO SDK.
RESOLUTION
If your application does not use _UNICODE (for example, it is built using
ANSI), it will not be thread-safe and Jet will not behave correctly in a
multi-threaded environment.
STATUSThis behavior is by design. REFERENCESFor more information about creating multi-threaded applications using DAO 3.5, read the section "DAO and the Apartment-threading Model" in DAO SDK 3.5 online documentation.
Keywords : kbcode kbDAO kbDatabase kbMFC kbVC kbVC500 kbVC600 |
Last Reviewed: July 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |