我想用vc连接SQL数据库,但是,每次我向stdafx.h中添加#import"C:\Program Files\Common Files\System\ado\msado15.dll"no_namespace  rename("EOF","adoEOF"),会出现报错:
Compiling...
StdAfx.cpp
d:\mfc\dormsystem\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
d:\mfc\dormsystem\stdafx.h(15) : error C2871: 'ADOCG' : does not exist or is not a namespace
g:\vc6\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
执行 cl.exe 时出错.DormSystem.exe - 1 error(s), 0 warning(s)
根据报错,我把afxv_32.h中的“WINDOWS.H”注释掉
错误变为:
Compiling...
StdAfx.cpp
d:\mfc\dormsystem\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
g:\vc6\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
执行 cl.exe 时出错.DormSystem.exe - 1 error(s), 0 warning(s)
怎么回事儿?