The Microsoft. Jet. oledb.4.0 provider is not registered on the Local Computer

Source: Internet
Author: User

Recently, Microsoft. Jet. oledb is a project mainly used to import data from Excel. It has been normal during debugging. However, when the data is imported to the customer's Environment (Windows Server 2008 r2 + Server 2000 + iis7), the data import function becomes faulty.

The error is as follows:

System. invalidoperationexception: Microsoft. Jet. oledb.4.0 is not registered on the local computer.Program.
In system. Data. oledb. oledbserviceswrapper. getdatasource (oledbconnectionstring constr, datasourcewrapper & datasrcwrapper)
In system. Data. oledb. oledbconnectioninternal.. ctor (oledbconnectionstring constr, oledbconnection connection)
In system. Data. oledb. oledbconnectionfactory. createconnection (dbconnectionoptions options, object poolgroupproviderinfo, dbconnectionpool, dbconnection owningobject)
In system. Data. providerbase. dbconnectionfactory. createnonpooledconnection (dbconnection owningconnection, dbconnectionpoolgroup poolgroup)
In system. Data. providerbase. dbconnectionfactory. getconnection (dbconnection owningconnection)
In system. Data. providerbase. dbconnectionclosed. openconnection (dbconnection outerconnection, dbconnectionfactory connectionfactory)
In system. Data. oledb. oledbconnection. open ()
In exceloperation. importfromexcel (string filename, string strsql)
In retiree_importdata.btnimport_click (Object sender, eventargs E)
In system. Web. UI. webcontrols. Button. onclick (eventargs E)
In system. Web. UI. webcontrols. Button. raisepostbackevent (string eventargument)
In system. Web. UI. Page. raisepostbackevent (ipostbackeventhandler sourcecontrol, string eventargument)
In system. Web. UI. Page. processrequestmain (Boolean includestagesbeforeasyncpoint, Boolean includestagesafterasyncpoint)

Later, I learned that the customer's operating system is 64-bit and the 32-bit application option is set to true in the IIS program pool settings. The problem is solved immediately as follows:

If you do not want to update the configuration of the IIS program pool, you can compile the program into x86. For details, see:

Failed to Load file or assembly XX or one of its Dependencies

 

========================================================== ====

2013-04-

Today, another problem occurs, also caused by a 64-bit system. For Windows Server 2003 64-bit, the error is also "Microsoft. jet. oledb.4.0 "provider", but the solution is different from that of Windows Server 2008 64-bit. The specific steps are as follows:

1. Save the following script as BAT and run it:

 
Cd % systemdrive % \ windows \ system32cscript % systemdrive % \ Inetpub \ adminscripts \ adsutil. vbs set w3svc/apppools/limits 1% SystemRoot % \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regiis.exe-I

2. Retry case. Net framework2.0

 

Solve the problem.

The Microsoft. Jet. oledb.4.0 provider is not registered on the Local Computer

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.