ADO CreateInstance(__uuidof(Connection))失败
2014-10-30 17:14
393 查看
现象:同一个程序,在有的机器上成功,有的机器上失败。
原因:编译本程序所在的机器上的msado15.dll的版本高于运行本程序所在的机器上的msado15.dll(c:\program files\common files\system\ado\msado15.dll)的版本
解决方案:编译时用一个较低版本的msado15.dll或者使用运行机器的msado15.dll
原理分析:应用程序使用#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")在编译时通过本msado15.dll解析出
msado15.tlh和msado15.tli(在Debug或Release中),之后应用程序运行时使用的ADO相关COM组件就是基于这两个文件的。ADO肯定考虑到兼容性,所以用较低版本的msado15.dll编译出的程序是可以运行在高版本的环境中的,而反之则肯定不行。
原因:编译本程序所在的机器上的msado15.dll的版本高于运行本程序所在的机器上的msado15.dll(c:\program files\common files\system\ado\msado15.dll)的版本
解决方案:编译时用一个较低版本的msado15.dll或者使用运行机器的msado15.dll
原理分析:应用程序使用#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")在编译时通过本msado15.dll解析出
msado15.tlh和msado15.tli(在Debug或Release中),之后应用程序运行时使用的ADO相关COM组件就是基于这两个文件的。ADO肯定考虑到兼容性,所以用较低版本的msado15.dll编译出的程序是可以运行在高版本的环境中的,而反之则肯定不行。
相关文章推荐
- VC下这样创建实例m_pRecordset.CreateInstance(_uuidof(Connection))不一定成功!...
- VC下这样创建实例m_pRecordset.CreateInstance(_uuidof(Connection))不一定成功!...
- _ConnectionPtr.CreateInstance(__uuidof(Connection)) 返回 E_NOINTERFACE
- _ConnectionPtr.CreateInstance(__uuidof(Connection))“不支持此接口”错误解决
- VC编译ADO的开发环境和客户环境的细微差别可能导致的失败 pCmd.CreateInstance("ADODB.Command") 0x80004002
- _ConnectionPtr CreateInstance失败
- CreateInstance(__uuidof(Connection))执行失败的解决办法
- C++ CreateInstance("ADODB.Connection");创建接口失败的解决方法
- C++ CreateInstance("ADODB.Connection");创建接口失败的解决方法
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection
- mavne运行异常:Cannot create instance of interfacetifac
- oracle jdeveloper 11g 安装到quickstart选择启动 异常:Unable to create an instance of the Java Virtual Machine
- sqldeveloper不能启动,显示Unable to create an instance of the Java Virtual Machine...的解决办法
- sqldeveloper 启动时报 Unable to create an instance of the Java Virtual Machine Located at path: ...
- Unable to create an instance of the Java Virtual Machine
- Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: layout.card
- 错误: 实例 "ahwater-linux-core" 执行所请求操作失败,实例处于错误状态。: 请稍后再试 [错误: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 7c1609c9-9d0f-4836-85b3-cefd45f942a7. Last exception: [u
- sqldeveloper启动时报 Unable to create an instance of the Java Virtual Machine Located at path: ../../jdk/jre/bin/client/jvm.dll 错误
- Oracle sql developer Unable to create an instance of the Java Virtu... 解决方法
- CreateInstance(__uuidof(Connection)) 不支持此接口解决方法