.net “Microsoft.Jet.OLEDB.4.0”提供程序未在本地计算机上注册

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8150232/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 16:02:15  来源:igfitidea点击:

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

.netvb.netjet

提问by Furqan Sehgal

I am having a problem with my application. When it is run, the error displays

我的应用程序有问题。运行时,显示错误

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

“Microsoft.Jet.OLEDB.4.0”提供程序未在本地计算机上注册。

I tried changing Platform to X86 CPU but it could not be changed, the only available option is Any CPU.

我尝试将平台更改为 X86 CPU,但无法更改,唯一可用的选项是任何 CPU。

Please advise how to get rid of this error.

请告知如何摆脱此错误。

Thanks

谢谢

回答by Chtiwi Malek

you are using the Jet.OLEDB.4.0 driver, which gives that error when run on 64 bit system, it is better to install the new driver Microsoft Access Database Engine 2010 Redistributable

您正在使用 Jet.OLEDB.4.0 驱动程序,在 64 位系统上运行时会出现该错误,最好安装新驱动程序 Microsoft Access Database Engine 2010 Redistributable

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

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

also you'll need to change the connexion string from “Provider=Microsoft.Jet.OLEDB.4.0; “ to “Provider=Microsoft.ACE.OLEDB.12.0;”

您还需要将连接字符串从“Provider=Microsoft.Jet.OLEDB.4.0; “到“提供商=Microsoft.ACE.OLEDB.12.0;”

reference from my blog: 64 bit version of ‘Microsoft.Jet.OLEDB.4.0' Office 2007/2010 Jet drivers

来自我的博客的参考: 64 位版本的“Microsoft.Jet.OLEDB.4.0”Office 2007/2010 Jet 驱动程序

hope this helps.

希望这可以帮助。

回答by writeToBhuwan

Open IIS manager, select Application Pools, select the application pool you are using, click on Advanced Settingsin the right-hand menu. Under General, set "Enable 32-Bit Applications" to "True".

打开IIS管理器,选择Application Pools,选择你正在使用的应用程序池,点击Advanced Settings右侧菜单中的 。在常规下,设置"Enable 32-Bit Applications" to "True".

Now x86 option will be visible and build your app in this mode

现在 x86 选项将可见并在此模式下构建您的应用程序

回答by Naval

Access is not installed on the system. you have to install either microsoft office, or access database engine (which is free and much smaller) here is the link to install it for access 2010:

系统上未安装 Access。您必须安装 microsoft office 或 access 数据库引擎(免费且体积小得多),这里是安装它以访问 2010 的链接:

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

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

回答by shishir kumar

The Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine Background

Microsoft.Jet.OLEDB.4.0 提供程序未在本地计算机上注册 背景

RNT Customer is designed to work on 32 or 64 bit PCs running Windows XP, Windows Vista, Windows 7 or Windows 8 Pro, but on Windows XP 64 bit (and possibly other operating systems) it is possible that some of the Microsoft OLEDB DLLs have not been registered.

RNT 客户旨在在运行 Windows XP、Windows Vista、Windows 7 或 Windows 8 Pro 的 32 位或 64 位 PC 上工作,但在 Windows XP 64 位(可能还有其他操作系统)上,某些 Microsoft OLEDB DLL 可能具有没有被注册。

Solution No. 1

解决方案 1

The solution is to manually register those DLLs.

解决方案是手动注册这些 DLL。

go to Start->Run and type cmd this starts the Command Prompt (also available from Start->Programs->Accessories->Command Prompt)

转到开始->运行并键入 cmd 这将启动命令提示符(也可从开始->程序->附件->命令提示符)

type cd \and press return

输入cd \并按回车

The prompt should now show C:\>

提示现在应该显示 C:\>

You need to go to a special folder which would be something like

您需要转到一个特殊的文件夹,类似于

  • c:\windows\system32
  • c:\winnt\system32
  • c:\windows\sysWOW64
  • c:\windows\system32
  • c:\winnt\system32
  • c:\windows\sysWOW64

Try typing each of these. If it says "The system cannot find the path specified, try the next one" e.g.

尝试键入其中的每一个。如果它说“系统找不到指定的路径,请尝试下一个”例如

  • cd c:\windows\sysWOW64
  • cd c:\windows\system32
  • cd c:\winnt\system32
  • cd c:\windows\sysWOW64
  • cd c:\windows\system32
  • cd c:\winnt\system32

When one of those doesn't cause an error, stop, you've found the correct folder.

当其中之一不会导致错误时,请停止,您已找到正确的文件夹。

You need to register the OLE DB 4.0 DLLs by typing these commands and pressing return after each

您需要通过键入这些命令并在每个命令后按回车键来注册 OLE DB 4.0 DLL。

  • regsvr32 Msjetoledb40.dll
  • regsvr32 Msjet40.dll
  • regsvr32 Mswstr10.dll
  • regsvr32 Msjter40.dll
  • regsvr32 Msjint40.dll
  • regsvr32 Msjetoledb40.dll
  • regsvr32 Msjet40.dll
  • regsvr32 Mswstr10.dll
  • regsvr32 Msjter40.dll
  • regsvr32 Msjint40.dll

*Solution No. 2 *

*解决方案 2 *

To resolve this issue open the project in Visual Studio then:

要解决此问题,请在 Visual Studio 中打开项目,然后:

  1. From the solution explorer right-click your project then click Properties
  2. Click the Build tab
  3. Change Platform target from: Any CPU to x86
  4. Re-build your solution
  1. 在解决方案资源管理器中右键单击您的项目,然后单击属性
  2. 单击构建选项卡
  3. 将平台目标从:任何 CPU 更改为 x86
  4. 重新构建您的解决方案

回答by user2862440

Causes: Hosting of Asp.net application on 64 bit machine. But our site reference to third party DLL which is build in 32 bit. step by step solutionOnce i tried all solution but i was stuck , because i was using ODBC driver insted of OLEDB.

原因:在 64 位机器上托管 Asp.net 应用程序。但是我们的站点引用了 32 位构建的第三方 DLL。 逐步解决方案一旦我尝试了所有解决方案,但我被卡住了,因为我使用的是 OLEDB 的 ODBC 驱动程序。