ADO连接CreateInstance在Windows Server 2003上失败 [英] ADO Connection CreateInstance Fails On Windows Server 2003

查看:195
本文介绍了ADO连接CreateInstance在Windows Server 2003上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在Windows 7上运行良好,但在Server 2003上失败。失败的行是

I have an application that runs fine on Windows 7 but is failing on Server 2003. The line that fails is the third line below

_ConnectionPtr pConnection = NULL;
::CoInitialize(NULL);
HRESULT hr = pConnection.CreateInstance(__uuidof(Connection));

返回的HRESULT为0x80004002(不支持接口)。这两个机器都安装了MDAC,我不明白为什么我得到这个错误。

The HRESULT returned is 0x80004002 (Interface not supported). Both machines have the MDAC installed and I can't see why I am getting this error. Any reasons this might be happening?

推荐答案

这可能会有帮助...

This might help...

在正在运行的计算机上重新编译ADO应用程序后,ADO应用程序不会在低级操作系统上运行Windows 7 SP 1或Windows Server 2008 R2 SP 1或已安装KB983246

这篇关于ADO连接CreateInstance在Windows Server 2003上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆