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

  • Question

  • I deployed a web app on a Windows 2003 64bit server SP2. It comes up fine and functions, except one of the things that it does: read a an excel 2003 file, throws the above error.

    I looked around and found a 64bit MDAC provider: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=20065

    and installed that, the first one in the list. But I still get the same error.

    Here is my connection string: @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\";";

    If my connection string is good, and I installed the 64 bit driver, then what else could be wrong?

    By the way, I cannot change the project to compile in 32 bit mode, there are other pages in this app that will be disrupted if I do this.

     

    Can anyone suggest anything?

     

    Thanks!!



    --ACG
    Thursday, November 10, 2011 10:17 PM

Answers

All replies

  • write a web service and run it in an 32bit application pool, or use the new Microsoft Access Database Engine 2010. Note if you install the 64bit engine you cannot install the 32bit version of Office products. 

    Jet is not included in WDAC. It was removed from its predecessor MDAC version 2.6 a decade ago. And MSDASQL is not WDAC, it is just one of the OLEDB drivers.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Friday, November 11, 2011 3:03 AM
  • I'm not at my computer to try it right now, but, if I install from the link you give, do I have to change my connection string?

     

    Also, are you saying that if I install this, that other apps that use 32 bit mdac will no longer work?


    --ACG
    • Edited by ACG Friday, November 11, 2011 12:55 PM
    Friday, November 11, 2011 12:47 PM
  • yes, if you use another provider, you must specify the provider in the connection string.

    The provider does not affect MDAC.

     



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Friday, November 11, 2011 1:35 PM
  • Below are connection string examples for the ACE OLEDB Provider:

    http://www.connectionstrings.com/access-2007

    http://www.connectionstrings.com/excel-2007

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, November 11, 2011 3:53 PM
  • Hi ACG,

    Welcome!

    Please refer this FAQ here: http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/b5a79958-5bce-4229-a69f-75589b6240a8

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Alan_chen Monday, November 21, 2011 6:49 AM
    Monday, November 14, 2011 6:18 AM
  • Hi,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, November 17, 2011 2:08 AM
  • I just tried the suggestion at the FAQ ... and got this error ...

    ERROR ( message:Configuration error

    Filename: redirection.config
    Line Number: 0
    Description: Cannot read configuration file due to insufficient permissions
    . )

    ... which I had to type in because I can not cut/paste out of a cmd window.  I think I am log'd in as the administrator with full priv's ... 

    A search for "redirection.config" finds no files.

    What is next suggestion?

    Monday, May 14, 2012 5:02 PM
  • I went looking for the program/script mentioned in the FAQ ...

    %windir%\system32\inetsrv\appcmd

    First, did this ...

    echo %windir%

    ... to determine that windir = C:\Windows ... then discovered that I did not have any access to this folder ...

    C:\Windows/system32\inetsrv

    ... and was prompted to allow access and said "yes" ... and so then reran the appcmd ... and it looks like it worked ...

    Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration path "MACHINE/WEBOOT/APPHOST"

    Now my web application no longer gives me the "Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine" error .. but rather this error ...

    An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

    ... and also provides this info ...

    [InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

    ... bleh ... I'll google that and see what comes up.

    Monday, May 14, 2012 5:18 PM
  • What is the command to undo this ...

    %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true

    ... because my website was more usable without this than it is now with it :-(



    Tuesday, May 15, 2012 12:34 AM
  • I believe I have reversed the effects of this command by doing the following ...

    From IIS Manager ... Application Pools ... Advance Settings ... set "Enable 32-Bit Applications" to "False" ...

    So ... now I'm back to the original error ... 

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

    ... and I'm being told that Jet is not supported on my Windows 2008 server ... and instead I have to install ACE ...

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

    ... and make some code changes ... bleh ...

    Tuesday, May 15, 2012 10:24 PM