您的位置:首页 > 产品设计 > UI/UE

CreateInstance(__uuidof(Connection)) 不支持此接口解决方法

2017-11-08 19:09 288 查看
数据库对象mssql2005sp3专业版:

一般数据引用该路径文件#import "c:\\program files\\common files\\system\\ado\\msado15.dll"  no_namespace rename("EOF", "adoEOF")。

但是,msado15.DLL XP 与 WIN7 的版本不一致

HRESULT hr = pConnection.CreateInstance("ADODB.Connection");创建接口失败,换成


HRESULT hr = pConnection.CreateInstance(_uuidof(Connection))也不行

#import "c:\\program files\\common files\\system\\ado\\msado20.tlb"  no_namespace rename("EOF", "adoEOF")。使用这句话就可以了。

具体原因还在调查。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐