ADO Connection CreateInstance Fails On Windows Server 2003

自古美人都是妖i 提交于 2019-12-31 03:51:13

问题


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));

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?


回答1:


This might help...

An ADO application does not run on down-level operating systems after you recompile it on a computer that is running Windows 7 SP 1 or Windows Server 2008 R2 SP 1 or that has KB983246 installed



来源:https://stackoverflow.com/questions/11363878/ado-connection-createinstance-fails-on-windows-server-2003

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!