问一个很简单的问题,关于在同一个程序中混合使用ADO和DAO的时候要注意的东西,大家来捧个场&^
Win 98 SE, VC++ 6.0 Professional, MS ACCESS 97.
我在程序中使用了ADO和DAO.
单独使用任何一种时,没有问题,但是,都使用的时候,出了问题了.
我感觉是在我的 StdAfx.h 中出了问题.
以下是在StdAfx.h中与数据库有关的头文件
#include <afxdb.h>
#include <afxdao.h>
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename ("EOF", "adoEOF")
症状:
.....debug\msado15.tlh(143) : error C2011: 'LockTypeEnum' : 'enum' type redefinition
.....debug\msado15.tlh(184) : error C2011: 'DataTypeEnum' : 'enum' type redefinition
.....debug\msado15.tlh(228) : error C2011: 'FieldAttributeEnum' : 'enum' type redefinition
.....debug\msado15.tlh(245) : error C2011: 'EditModeEnum' : 'enum' type redefinition
.....debug\msado15.tlh(253) : error C2011: 'RecordStatusEnum' : 'enum' type redefinition
.....debug\msado15.tlh(432) : error C2011: 'ParameterDirectionEnum' : 'enum' type redefinition
Error executing cl.exe.
***.exe - 6 error(s), 0 warning(s)