Microsoft.Jet.OLEDB.4.0' 提供程序未在本地计算机上注册 [英] Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

查看:51
本文介绍了Microsoft.Jet.OLEDB.4.0' 提供程序未在本地计算机上注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 32 位 Windows 2008 服务器中创建了一个用 .NET 3.5 开发的 Windows 应用程序.在 64 位服务器中部署应用程序时,它显示错误Microsoft.Jet.OLEDB.4.0' provider 未在本地计算机上注册".

I created a windows application developed in .NET 3.5 in a 32 bit Windows 2008 server. When deployed the application in a 64 bit server it shows the error "Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine ".

所以为了解决这个问题,我把项目的build属性改为X86,这样它就可以在32位模式下构建,并在32位机器上重建项目.但是,同一个项目使用其他数据库驱动程序(DB2、SQL 等)连接到其他数据库.因此,当我在 64 位操作系统中再次部署我的应用程序时,它抛出异常尝试在 32 位平台上加载 64 位程序集."

So as a solution to this issue, i have changed the build property of the project to X86, so that it will build in 32 bit mode, and rebuild the project in the 32bit machine. But, the same project uses other DB drivers (DB2, SQL etc.) to connect to other databases. So when i deployed my app again in the 64 bit OS, it throws the exception " Attempted to load a 64-bit assembly on a 32-bit platform. "

我正在使用 Microsoft.Jet.OLEDB.4.0 驱动程序来读取和写入 Excel (.xls)

I am using the Microsoft.Jet.OLEDB.4.0 driver to read and write to the Excel (.xls)

推荐答案

我找到了解决这个问题的方法.我在问题中描述的问题主要是由于 Microsoft.Jet.OLEDB.4.0 驱动程序 在 64 位操作系统中不兼容而发生的.

I found a solution for this problem. The issue I described in my question occured basically due to the incompatibility of the Microsoft.Jet.OLEDB.4.0 driver in 64 bit OS.

因此,如果我们在 64 位服务器中使用 Microsoft.Jet.OLEDB.4.0 驱动程序,我们必须强制我们的应用程序以 32 位模式构建(这是我在对此进行广泛搜索时找到的答案)已知问题),这会导致我的代码的其他部分中断.

So if we are using Microsoft.Jet.OLEDB.4.0 driver in a 64 bit server, we have to force our application to build in in 32 bit mode (This is the answer I found when I did an extensive search for this known issue) and that causes other part of my code to break.

幸运的是,现在微软已经发布了一个 64 位兼容的2010 Office System Driver,它可以替代传统的 Microsoft.Jet.OLEDB.4.0 驱动程序.它适用于 32 位和 64 位服务器.我已经将它用于 Excel 文件操作,并且在这两种环境中对我来说都很好.但此驱动程序处于BETA.

Fortunately, now Microsoft has released a 64 bit compatible 2010 Office System Driver which can be used as replacement for the traditional Microsoft.Jet.OLEDB.4.0 driver. It works both in 32 bit as well as 64 bit servers. I have used it for Excel file manipulation and it worked fine for me in both the environments. But this driver is in BETA.

您可以从 Microsoft Access Database Engine 2010 Redistributable

这篇关于Microsoft.Jet.OLEDB.4.0' 提供程序未在本地计算机上注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆