PRB: C2189 and C2857 Errors When AFXDB.H Used for UNICODELast reviewed: July 10, 1997Article ID: Q128894 |
2.00 2.10
WINDOWS NT
kbtool kbprg
The information in this article applies to:
SYMPTOMSWhen attempting to build an AppWizard-generated DLL or EXE with ODBC support, two compiler errors are generated when STDAFX.CPP is compiled :
<Path>\msvc20\mfc\include\afxdb.h(15): error C2189: #error: Database classes not supported in this library variant. <Path>\stdafx.cpp(7): error C2857: '#include' statement specified with the /Ycstdafx.h command-line option was not found in the source file. CAUSEThe project settings for the DLL or EXE have been changed so that _UNICODE is defined, instead of _MBCS. When using AppWizard to generate a DLL or an EXE with ODBC support, AppWizard automatically adds the following to the STDAFX.H file it generates:
#include <afxdb.h>However, ODBC does not support Unicode, so MFC produces a compilation error whenever an attempt is made to build a Unicode application or DLL that includes the MFC database classes header file (AFXDB.H).
RESOLUTION
STATUSThis behavior is by design.
|
Additional reference words: 2.00 2.10 dll unicode database
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |