vc 连接数据库CreateInstance失败问题
来源:互联网 发布:网络诈骗1000元立案吗 编辑:程序博客网 时间:2024/05/23 20:02
下面是在微软MSDN官网查到的类似问题的答疑,具体网址如下
http://social.msdn.microsoft.com/Forums/vstudio/en-US/701d05aa-e8d2-4f46-8cc1-448a8d35bd37/windows-7-sp1-ado-compatibility
内容:
Windows 7 SP1 ADO Compatibility
Visual Studio Languages forums > Visual C++
Question
0
Sign in to vote
Hi:
I am a little confused, the same code compiled on different platforms(Windows 7,Windows 7 SP1 ,Windows XP SP3) have different results with VC2010 professional
_ConnectionPtr m_pConn;
m_pConn.CreateInstance(__uuidof(Connection));
compiled on Windows 7 or Windows XP SP3 , normal work.But complied on Windows 7 SP1,only run Windows 7 SP1,doesn't work on other computers without Win7 SP1, after m_pConn.CreateInstance(__uuidof(Connection)),result :m_pConn == NULL!
Monday, February 28, 2011 6:32 AM
Reply | Quote |
default20110 Points
Answers
0
Sign in to vote
Hi:
This is Windows 7 32bit! Install SP1 ,msado15.dll version:6.1.7601.17514. old version :6.1.7600.16385 of without SP1!
KB983264 contain : Msado15.dll 6.1.7600.20701 !
SO, If ADO program compiled on Windows 7 SP1 ,your ADO program can work on a computer with KB983246 or install Windows 7 SP1!
OK,Thanks !
Wednesday, March 02, 2011 3:11 AM
Reply | Quote |
default20110 Points
All replies
0
Sign in to vote
Explain what "doesn't work" means.
m_pConn.CreateInstance() returns an HRESULT if it fails. What is its value?
Monday, February 28, 2011 4:57 PM
Reply | Quote |
Brian Muth (MCC, MVP) 49,380 Points
0
Sign in to vote
Hi:
Becuse I compiled on Windows 7 SP1,application only work the computer with Windows 7 SP1!or else m_pConn.CreateInstance() failed! HRESULT value: -2147467262
Tuesday, March 01, 2011 1:32 AM
Reply | Quote |
default20110 Points
0
Sign in to vote
i think first of all you check whether your windows 7 is 64 bit or 32 bit. if it is 64 bit and you have 64 bit driver used for database access i.e(check paths from program files or Program files(x86) it should be program files(x86) for 32 bit application on windows 7 64 bit). it is also worth checking whether you have proper version of drivers for ADO for 32 bit if your application is 32 bit and 64 bit if your application is 64 bit. By default Windows7 only install one of them depend on windows version at a time.
Fahd Anwar
Tuesday, March 01, 2011 10:54 AM
Reply | Quote |
Fahd Anwar فہد انورElixir Technologies Paki...315 Points
0
Sign in to vote
Hi:
Becuse I compiled on Windows 7 SP1,application only work the computer with Windows 7 SP1!or else m_pConn.CreateInstance() failed! HRESULT value: -2147467262
That value is 0x80004002, which is "No such interface is supported". There is something odd here. I'm wondering if you are using the #import directive on a version of ADO which is not available on earlier versions of the operating system.
Tuesday, March 01, 2011 5:04 PM
Reply | Quote |
Brian Muth (MCC, MVP) 49,380 Points
0
Sign in to vote
Hi:
This is Windows 7 32bit! Install SP1 ,msado15.dll version:6.1.7601.17514. old version :6.1.7600.16385 of without SP1!
KB983264 contain : Msado15.dll 6.1.7600.20701 !
SO, If ADO program compiled on Windows 7 SP1 ,your ADO program can work on a computer with KB983246 or install Windows 7 SP1!
希望能给碰到类似问题的有点作用!
http://social.msdn.microsoft.com/Forums/vstudio/en-US/701d05aa-e8d2-4f46-8cc1-448a8d35bd37/windows-7-sp1-ado-compatibility
内容:
Windows 7 SP1 ADO Compatibility
Visual Studio Languages forums > Visual C++
Question
0
Sign in to vote
Hi:
I am a little confused, the same code compiled on different platforms(Windows 7,Windows 7 SP1 ,Windows XP SP3) have different results with VC2010 professional
_ConnectionPtr m_pConn;
m_pConn.CreateInstance(__uuidof(Connection));
compiled on Windows 7 or Windows XP SP3 , normal work.But complied on Windows 7 SP1,only run Windows 7 SP1,doesn't work on other computers without Win7 SP1, after m_pConn.CreateInstance(__uuidof(Connection)),result :m_pConn == NULL!
Monday, February 28, 2011 6:32 AM
Reply | Quote |
default20110 Points
Answers
0
Sign in to vote
Hi:
This is Windows 7 32bit! Install SP1 ,msado15.dll version:6.1.7601.17514. old version :6.1.7600.16385 of without SP1!
KB983264 contain : Msado15.dll 6.1.7600.20701 !
SO, If ADO program compiled on Windows 7 SP1 ,your ADO program can work on a computer with KB983246 or install Windows 7 SP1!
OK,Thanks !
Wednesday, March 02, 2011 3:11 AM
Reply | Quote |
default20110 Points
All replies
0
Sign in to vote
Explain what "doesn't work" means.
m_pConn.CreateInstance() returns an HRESULT if it fails. What is its value?
Monday, February 28, 2011 4:57 PM
Reply | Quote |
Brian Muth (MCC, MVP) 49,380 Points
0
Sign in to vote
Hi:
Becuse I compiled on Windows 7 SP1,application only work the computer with Windows 7 SP1!or else m_pConn.CreateInstance() failed! HRESULT value: -2147467262
Tuesday, March 01, 2011 1:32 AM
Reply | Quote |
default20110 Points
0
Sign in to vote
i think first of all you check whether your windows 7 is 64 bit or 32 bit. if it is 64 bit and you have 64 bit driver used for database access i.e(check paths from program files or Program files(x86) it should be program files(x86) for 32 bit application on windows 7 64 bit). it is also worth checking whether you have proper version of drivers for ADO for 32 bit if your application is 32 bit and 64 bit if your application is 64 bit. By default Windows7 only install one of them depend on windows version at a time.
Fahd Anwar
Tuesday, March 01, 2011 10:54 AM
Reply | Quote |
Fahd Anwar فہد انورElixir Technologies Paki...315 Points
0
Sign in to vote
Hi:
Becuse I compiled on Windows 7 SP1,application only work the computer with Windows 7 SP1!or else m_pConn.CreateInstance() failed! HRESULT value: -2147467262
That value is 0x80004002, which is "No such interface is supported". There is something odd here. I'm wondering if you are using the #import directive on a version of ADO which is not available on earlier versions of the operating system.
Tuesday, March 01, 2011 5:04 PM
Reply | Quote |
Brian Muth (MCC, MVP) 49,380 Points
0
Sign in to vote
Hi:
This is Windows 7 32bit! Install SP1 ,msado15.dll version:6.1.7601.17514. old version :6.1.7600.16385 of without SP1!
KB983264 contain : Msado15.dll 6.1.7600.20701 !
SO, If ADO program compiled on Windows 7 SP1 ,your ADO program can work on a computer with KB983246 or install Windows 7 SP1!
希望能给碰到类似问题的有点作用!
0 0
- vc 连接数据库CreateInstance失败问题
- VC 连接sql数据库, CreateInstance失败的原因
- 多线程操作数据库CreateInstance 失败
- VC++6.0连接ACCESS2007中的一个问题(ConnectionPtr, CreateInstance, CoInitialize(NULL))
- 多线程使用ADO操作数据库时,CreateInstance对象回失败
- 【数据库-SQL Server】CreateInstance(_T("ADODB.Connection"))创建实例失败
- _ConnectionPtr _RecordsetPtr CreateInstance失败
- ADO连接sqlserver数据库,CreateInstance返回 REGDB_E_CLASSNOTREG Class not registered
- mfc连接access2010数据库失败问题
- VC连接ACCESS数据库出现的问题
- ADO CreateInstance(__uuidof(Connection))失败
- 远程连接数据库失败
- 连接mysql数据库失败
- 解决连接数据库失败
- java连接数据库失败
- error:连接数据库失败
- Metasploit连接数据库失败
- JFinal连接数据库失败
- 单线程模型中Message、Handler、Message Queue、Looper之间的关系
- mount(挂载)命令使用
- IOS 圆形头像
- 微观架构和宏观架构论
- IOS下使用RSA加密与PHP通信,使用服务器下发的NSString类型参数
- vc 连接数据库CreateInstance失败问题
- Max Points on a Line
- c++ MFC 画笔画一个圆形
- 数据优化
- JScrollPane设置滚动条自动到最下(或最右)
- STL容器迭代器失效问题
- poj 3544 Journey with Pigs---贪心
- android:gravity和android:layout_gravity的区别
- GTK自定义函数之滚动窗口(4)-bobo