问题
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