在正规DLL内连接数据库,先不说是否创建了什么连接对象什么,我的问题是:
在InitInstance()中初始化了COM库,在Stdafx.h中也加了
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
但为什么有这样的错误:
g:\临时的项目\process\debug\msado15.tlh(169) : error C2011: 'LockTypeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(212) : error C2011: 'DataTypeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(256) : error C2011: 'FieldAttributeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(277) : error C2011: 'EditModeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(285) : error C2011: 'RecordStatusEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(405) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
g:\临时的项目\process\debug\msado15.tlh(527) : error C2011: 'ParameterDirectionEnum' : 'enum' type redefinition
Error executing cl.exe.Process.dll - 6 error(s), 1 warning(s)
warning ,就不管它了
帮帮忙
^_^
在InitInstance()中初始化了COM库,在Stdafx.h中也加了
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
但为什么有这样的错误:
g:\临时的项目\process\debug\msado15.tlh(169) : error C2011: 'LockTypeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(212) : error C2011: 'DataTypeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(256) : error C2011: 'FieldAttributeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(277) : error C2011: 'EditModeEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(285) : error C2011: 'RecordStatusEnum' : 'enum' type redefinition
g:\临时的项目\process\debug\msado15.tlh(405) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
g:\临时的项目\process\debug\msado15.tlh(527) : error C2011: 'ParameterDirectionEnum' : 'enum' type redefinition
Error executing cl.exe.Process.dll - 6 error(s), 1 warning(s)
warning ,就不管它了
帮帮忙
^_^
解决方案 »
- 想把VC++学好的新手
- 编安装软件需要什么知识?大家推荐几本书吧。
- vc,模式子对话框关闭时,主对话框也随之关闭,怎样才能不使它关闭,
- 为什么要多出GetMessage()->TranslateMessage()->DispatchMessage()这3步?让windows自己处理不行吗?
- 请问哪有COM的界面库,toolbar,menu之类的封装了的。
- 如何获取汉字的笔画? 如"上"的笔画为3划
- 怎么在VC中把引入的外部ACTIVEX类去掉,譬如DBGRID
- 继续问N久还没解决的CListView中排序问题,,,,顺便请教各位某些参数的意义。。。
- 谁懂ASSERT(!pDX->m_bSaveAndValidate);
- 求教:VC中怎样按顺序向数据库添加记录?
- 这个问题问了几遍了,可能因为是sdk的所以回答的人很少,不过我还是想问最后一遍
- 用CSocket做了个Win32 Console Application的服务器端,无法Creat!
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT里面已经引入了ADO库,然后你又引入一次.所以就有了
type redefinition的错误,
你可以根据需要注释掉上述语句,或者自己不再引入ADO库
不可以的,ADO,就是应该加入
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
也照你说的,注释掉了,还是不行,如果去掉上面的,错误就更多了,我不知道了
you are right
thank you very much
passed the
#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT