vb.net microsoft.jet.oledb.4.0 provider未在本地注册
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17484553/
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
microsoft.jet.oledb.4.0 provider is not registered on the local machine
提问by user1594990
I am working on a windows application with Ms access database(.mdb) and Visual Studio 2012,when first time i run the application error occurred says :
我正在使用 Ms access 数据库 (.mdb) 和 Visual Studio 2012 开发 Windows 应用程序,当我第一次运行应用程序时发生错误说:
microsoft.jet.oledb.4.0 is not registered in the local machine
microsoft.jet.oledb.4.0 is not registered in the local machine
After seeing all posts i resolved this error by make a change from AnyCpu to X86,then its working fine in Visual studio runtime.....
在看到所有帖子后,我通过将 AnyCpu 更改为 X86 解决了这个错误,然后它在 Visual Studio 运行时中工作正常.....
But..Now i created a setup and when i run the setup then same error occurred here on the developer PC.
但是..现在我创建了一个设置,当我运行该设置时,在开发人员 PC 上发生了同样的错误。
PC configuration :
电脑配置:
Windows 8,VS2012,64bit
Windows 8,VS2012,64bit
Please let me know what to do here.
请让我知道在这里做什么。
回答by VB.NET LEARNER
To resolve this issue open the project in Visual Studio then:
要解决此问题,请在 Visual Studio 中打开项目,然后:
- From the solution explorer right-click your project then click Properties
- Click the Build tab
- Change Platform target from: Any CPU to x86
- Re-build your solution
- 在解决方案资源管理器中右键单击您的项目,然后单击属性
- 单击构建选项卡
- 将平台目标从:任何 CPU 更改为 x86
- 重新构建您的解决方案
5.Check if traget platform of the setup is x86
5.检查设置的traget平台是否为x86
回答by Ehsan Akbar
The Microsoft.Jet.OLEDB.4.0 driver is incompatible with 64 bit Windows, that is why you are getting the error. If you have other applications using that connection string, they are more than likely set up to run in Windows 32 bit mode.
Microsoft.Jet.OLEDB.4.0 驱动程序与 64 位 Windows 不兼容,这就是您收到错误的原因。如果您有其他使用该连接字符串的应用程序,它们很可能设置为在 Windows 32 位模式下运行。
MS has released a driver that'll run in both 32 and 64 bit modes, you can find it here:
MS 发布了一个可以在 32 位和 64 位模式下运行的驱动程序,您可以在这里找到它:
回答by fvu
I don't know what runtime you are using, but probably the Access Redistributable, which exists in 32 and 64 bits incarnations. As far as I know you cannot have both installed simultaneously, and the 64 bits one will not serve 32 bits apps and vice versa.
我不知道您使用的是什么运行时,但可能是Access Redistributable,它以 32 位和 64 位的形式存在。据我所知,您不能同时安装两者,并且 64 位的应用程序不会提供 32 位的应用程序,反之亦然。
My solution has been to impose the 32 bits runtime and edit the UDL file not by clicking it, but by editing it with eg
我的解决方案是强加 32 位运行时并编辑 UDL 文件,而不是通过单击它,而是通过编辑它,例如
C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll",OpenDSLFile C:\test.udl
as explained here
为解释在这里
You may also find this informationhelpful, I admit that my workaround is maybe a bit heavyhanded, but it was the easiest way to avoid the issue...
您可能还会发现这些信息很有帮助,我承认我的解决方法可能有点笨拙,但这是避免问题的最简单方法......