ADODB COM object not found

时光毁灭记忆、已成空白 提交于 2019-12-06 05:06:17

With Windows Server 2008 R2 SP1, the ADO COM interfaces were changed. As a result, any ADO application compiled on a system with Windows 7 SP1 or Server 2008 R2 SP1 does not run on older operating systems (such as Server 2008 non-R2).

Here's the link to the Knowledge Base article describing this issue (KB2517589):

The article also contains a few workarounds, in particular, it links to a "compatibility typelib" that you can use for compiling on your dev machine.

Unfortunately, there is no "real" solution for this problem yet (which is particularly painful for VBA developers, where the only current workaround is to uninstall Windows 7 SP1 on the dev machine). There is a thread in the Microsoft Forums where this issue is discussed and where updates are posted:


UPDATE: In the meantime, Microsoft has released a fix for this issue. If you install the hotfix from the following page (KB 2640696) on your Windows 7 SP1/2008R2 SP1 development machine and recompile your application, it will work again on older operating systems:

Maybe you can try the following utility to identify if it is really there or not: MDAC Utility: Component Checker http://www.microsoft.com/download/en/details.aspx?id=1953 It doesn't mention Windows Server 2008 but maybe it works...

If you are sure there is no ADODB COM object in that server then you need to install the MDAC2.8 components that you can also download from Microsoft.

Link: http://www.microsoft.com/download/en/details.aspx?id=5793

Also, in a Windows Server 2008 you can go to folder: C:\Program Files\Common Files\System\ado and check if you have the MDAC components there. For MDAC 2.8 you should have: msado28.tlb which is the one you can use to reference ADODB objects in a MS OFfice VBA project.

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