How can I correct this ADODB missing reference error in VB .NET that I'm getting after upgrading to Windows 10?

别说谁变了你拦得住时间么 提交于 2019-12-11 04:19:17

问题


After upgrading to Windows 10, I got a lot of errors relating to a broken ADODB reference in my VB .NET application. I performed the steps described in the answer from this topic and that seemed to fix the broken reference errors. That solution actually got the application working for some of my colleagues on their Windows 10 systems. Unfortunately, anywhere in the application where I'm using a Recordset, I'm still getting this error:

"Reference required to assembly 'ADODB, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'ADODB.Recordset'. Add one to your project."

When I investigated some more, I found that the reference's location was "C:\Program Files (x86)\Common Files\System\ado\msado25.tlb". With this path, I tried to register msado25.tlb type library using Tlbimp.exe but it didn't seem to help any.

I have a feeling that I'm missing something stupid but I have no idea what it is. Any help would be greatly appreciated. Thank you.

Here are some additional related screenshots that may help:

ADODB Reference Properties

Registry


回答1:


I had this issue after the Windows 10 Anniversary update and I solved it by using tlbimp.exe. tlbimp generates a new adodb.dll and you can reference this in your project.

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\tlbimp.exe" "C:\Program Files (x86)\Common Files\System\ado\msado21.tlb"

The Type Library Importer converts the type definitions found within a COM type library into equivalent definitions in a common language runtime assembly.



来源:https://stackoverflow.com/questions/39813023/how-can-i-correct-this-adodb-missing-reference-error-in-vb-net-that-im-getting

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