Microsoft.Jet.OLEDB.4.0 - Provider can not be found or it may not be installed

戏子无情 提交于 2020-01-01 09:54:06

问题


I have created an Excel Macro in which I have used Microsoft.Jet.OLEDB.4.0 to fire query on Excel work sheets.

It's working perfect on my machine but my client is facing issue with it. (see the attached screen print)

Here are details for my Connection Object:

Dim cn
Set cn = CreateObject("ADODB.Connection")
With cn
    .Provider = "Microsoft.Jet.OLEDB.4.0"
    .ConnectionString = "Data Source=" & ThisWorkbook.FullName & "; Extended Properties=Excel 8.0"
    .Open
End With

Please Note: It is must for me to make the code working in "Windows 7"


回答1:


The provider will fail like that on Window 7 Office x64 as the provider isn't supported on that platform.

You need to install the x64 Microsoft Access Database Engine 2010 Redistributable and change your connection string to Provider=Microsoft.ACE.OLEDB.12.0



来源:https://stackoverflow.com/questions/12495232/microsoft-jet-oledb-4-0-provider-can-not-be-found-or-it-may-not-be-installed

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