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

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

问题描述

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

因此​​,作为解决这个问题,我已经改变了项目X86的构建属性,使之建立在32位模式,并重建在32位机的项目。但是,同样的项目使用其他数据库驱动程序(DB2,SQL等)连接到其他数据库。所以,当我在64位操作系统上再部署我的应用程序,它会抛出异常尝试加载64位组件在32位平台上。

我现在用的是Microsoft.Jet.OLEDB.4.0驱动程序读取和写入到Excel(.xls的)

解决方案

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

因此​​,如果我们在64位服务器使用Microsoft.Jet.OLEDB.4.0驱动程序,我们必须迫使我们的应用程序在32位模式构建的(这是我发现,当我做这个广泛的搜索答案已知问题),并引起了我的code打破其他部分。

幸运的是,现在微软已经发布了64位兼容的 2010 Office系统驱动程序可以用来作为替代传统的Microsoft.Jet.OLEDB.4.0驱动程序。它的工作原理无论是在32位和64位服务器。我已经用它为Excel文件处理,并在这两个环境中工作对我罚款。 但是,此驱动程序是在试用版

您可以从 Microsoft Access数据库引擎2010可再发行

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 ".

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. "

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

解决方案

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.

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.

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.

You can download this driver from Microsoft Access Database Engine 2010 Redistributable

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

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