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

    Question

  • I just installed Visual Studio 2005 today and I'm already getting an error. This code worked fine on 2003. I am running Windows XP 64 so I definitely have the latest MDAC. Anyone know why I would get this error?


    Dim strConnect As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & GetWorkingPath() & "db.mdb;Persist Security Info=False;"

    conn = New OleDbConnection(strConnect)

    conn.Open()

    Friday, November 04, 2005 10:33 PM

Answers

All replies

  • There is not a 64 bit version of jet that is why you get that error.  To force your app to use the 32 bit change the target cpu to x86 in the advanced compiler options.

    http://www.vb-tips.com/default.aspx?ID=c8303e25-496d-4288-bc1d-58e5850daf5e

    Friday, November 04, 2005 11:44 PM
  • Thanks
    Saturday, November 05, 2005 11:17 AM
  • I'm getting the same problem, but when I do the x86 option it doesn't help, either in C# or VB.  I've run CompChecker and got the following, everything is cool:
    <cc>
           <releases>
            <release name="MDAC 2.1 SP2"/>
            <release name="MDAC 2.5"/>
            <release name="MDAC 2.5 SP1"/>
            <release name="MDAC 2.5 SP2"/>
            <release name="MDAC 2.5 SP3" />
            <release name="MDAC 2.6 RTM" />
            <release name="MDAC 2.6 SP1" />
            <release name="MDAC 2.6 SP2" />
            <release name="MDAC 2.6 SP2 Refresh" />
            <release name="MDAC 2.7 RTM" />
            <release name="MDAC 2.7 Refresh" />
            <release name="MDAC 2.7 SP1" />
            <release name="MDAC 2.7 SP1 Refresh" />
            <release name="MDAC 2.8 RTM" />
            <release name="MDAC 2.7 SP1 on Windows XP SP1" />
            <release name="MDAC 2.8 SP1 on Windows XP SP2" />
            <release name="MDAC 2.8 SP2 on Windows Server 2003 SP1" />
        </releases>
    </cc>   

    I'm out of ideas.  Every search I've done for this topic has not panned out.  Help please!

    Thanks,
    Dave Scofield
    Thursday, December 28, 2006 7:00 PM
  •  

    I found this information after a lengthy search:

    http://support.microsoft.com/kb/278604

    I used regsvr32 with  the five dll's under the Jet 4.0 OLD DB provider and it worked for me.

    Larry WWW

     

    Monday, February 05, 2007 11:17 PM
  • I'm not seeing the option of changing the target cpu in the Visual Basic 2005 Express version I'm using.  I'm I missing something or is this option only available in other versions of Visual Studio?
    Sunday, February 11, 2007 7:51 AM

  • Correct, this option is not supported in the Express versions.
    Monday, February 12, 2007 1:35 PM
  • These files were not on my machine so I copied them from a W2K3 box.

    Some would not register:

    msjint40
    msjter40
    mswstr10

    Error: "The module ... was loaded but the entry-point DLLRegisterServer was not found."

    If I change to x86 I get :

    Could not load file or assembly 'ClubsWS' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    Changing back to Any CPU and the service page displays byt my method fails when I try to access the mdb.

    Friday, February 16, 2007 3:58 PM

  • You can't install Jet this way. Use the download instead:

    http://support.microsoft.com/default.aspx/kb/239114

    Friday, February 16, 2007 4:10 PM
  • So what service pack do I use for Vista 64 bit as Vista is not listed anywhere in the kb article you refer to?

    W2K3 perhaps?

     

    EDIT: XP and W2K3 both state this is for a different hardware platform and will not install.

    Friday, February 16, 2007 4:45 PM

  • There currently is no 64-bit version of Jet and no plans at this time to create a 64-bit version of Jet.
    Friday, February 16, 2007 5:21 PM
  • So are you telling me I cannot use jet with Vista 64? Your earlier post and others above seem to suggest otherwise :(
    Friday, February 16, 2007 9:50 PM

  • The only way it will run under 64-bit Vista is from within a 32-bit application process. So essentially your application would have to be a 32-bit application which runs under the WOW64 subsystem. You cannot develop a 64-bit application that uses Jet.

    If you want, you can try installing it through Windows Update. I'm not running any of the 64-bit operating systems so I can't say for certain whether installation will work and I don't know for certain where the legacy components are installed in the 64-bit operating systems.

    Friday, February 16, 2007 10:47 PM
  • I have the "full" version of VS2005, and see no place to set the compiler options under Website or Build. Are we out of luck too if we have 64-bit version of the OS building for ASP.net?
    Saturday, March 17, 2007 1:06 PM

  • Project Properties...Compile tab...Advanced Compile Options button...Target CPU dropdown.

    As was previously mentioned, there is currently no 64-bit database engine for an Access database. As a result, you're limited to a 32-bit application in this instance.

    • Proposed as answer by Paras Parmar Friday, January 28, 2011 4:00 PM
    Monday, March 19, 2007 1:02 PM
  •  Paul P Clement IV wrote:


    Project Properties...Compile tab...Advanced Compile Options button...Target CPU dropdown.

    As was previously mentioned, there is currently no 64-bit database engine for an Access database. As a result, you're limited to a 32-bit application in this instance.

     

     

    TOOOO COOL!

    Sooooo easy.  Paul you are totally a MVP!

    Wednesday, March 28, 2007 1:16 AM
  • I have a similar problem - Jet is not installed on my new 32-bit Vista PC - which I need to support legacy applications. How can I install Jet 4.0 under Vista?

     

    Wednesday, April 04, 2007 12:41 AM
  • ODBC should have been installed with Vista 32 bit.  Look in your control panel under administrative tools dont you see Data Sources (ODBC)? 

     

    Anyway here is a link to install the 2007 Office System Driver: Data Connectivity Components. 

    • Proposed as answer by Vito DeCarlo Wednesday, December 31, 2008 4:00 PM
    Wednesday, April 04, 2007 10:16 AM

  • Jet is included in Vista. Look for the file msjet40.dll in the System32 folder under your Windows folder. If you're encountering any problems when attempting to use the provider, please post the connection string and associated error(s).
    Wednesday, April 04, 2007 11:45 AM
  • I write my web-page on ASP.NET on MS Visual Studio 2005 (Standart). When I try to launch my page on Development Server all is fine. But when I try to access it through IIS 7 I get the error in discussion. I am running Vista 64. How fix that?
    Thank you!
    • Proposed as answer by mnb1831 Saturday, December 18, 2010 4:48 PM
    Friday, April 06, 2007 12:02 PM

  • Unfortunately there is no 64-bit Jet OLEDB Provider. If you plan on using a Jet database then it must be with a 32-bit application.
    Friday, April 06, 2007 12:17 PM

  • >Project Properties...Compile tab...Advanced Compile Options button...Target CPU dropdown.


    I use MSVS 2005 Standart and dont see Compile tab in Project Properties for Web-site. Such the option is in project options for usual CLR application. Sorry if the question is stupid but it is my first asp.net site on MSVS.

    Friday, April 06, 2007 3:53 PM
  • I want to make sure I 100% understand the situation:

    If we use an Access database and try to open it using the Microsoft Jet 4.0 connector, it will work on a 64bit machine ONLY if we make the entire application work in 32-bit mode.

    What other choices do we have for reading an Access database? We use an Access DB to store system settings that can't be changed by the user, and that is the easiest way we have found to do it (our access DB is now about 6 meg in size).

    Since the OS's are "all" going to 64bit, does that mean Microsoft is not updating Access to a 64bit version? It doesn't make sense for me, as an application developer, to limit my program to only 32bit when I am using the .NET framework (version 2.0) and SQL Server, both of which can be (are) 64bit applications.

    Help me understand this please.
    Tuesday, April 10, 2007 2:58 AM
  •  Darin Horton wrote:

    I want to make sure I 100% understand the situation:

    If we use an Access database and try to open it using the Microsoft Jet 4.0 connector, it will work on a 64bit machine ONLY if we make the entire application work in 32-bit mode.



    Correct.

     

     Darin Horton wrote:

    What other choices do we have for reading an Access database? We use an Access DB to store system settings that can't be changed by the user, and that is the easiest way we have found to do it (our access DB is now about 6 meg in size).

    Since the OS's are "all" going to 64bit, does that mean Microsoft is not updating Access to a 64bit version? It doesn't make sense for me, as an application developer, to limit my program to only 32bit when I am using the .NET framework (version 2.0) and SQL Server, both of which can be (are) 64bit applications.

    Help me understand this please.



    There is no other option and currently no plans for a 64-bit library. At this point I do not know what will become of Microsoft Access when Office moves to 64-bit. From my perspective it would appear that Microsoft is encouraging developers to use SQL Server technology.
    SQL Server Compact Edition would probably be a suitable small footprint, embedded solution for your implementation. 

     

    Tuesday, April 10, 2007 6:55 PM
  • im having this same problem with vista how do i get into my project. im sorry i only have very limited computer knowledge.

    thanks

    Tuesday, April 10, 2007 7:53 PM
  • Hey Paul, Does the 32 bit version of Jet come on Vista? If no, what's the proper way to get it on that box since there's no download for Vista available?
    Thursday, April 26, 2007 6:04 PM

  • Yes, the Jet database components are installed with Vista.

    Thursday, April 26, 2007 6:54 PM
  • Let me phrase that differently. Does the 32 bit Jet come on a 64 bit Vista. I does show up on 32 bit but doesn't appear on the 64 bit box. Is there an install somewhere for the 32 bit version on Vista ?
    Thursday, April 26, 2007 11:07 PM
  • I've looked through my Data Access set-up via Administrative Tools and there is no Jet4.0 set-up in Vista by default. Any other suggestions?
    Saturday, May 05, 2007 3:26 AM
  •  Bruce N. Baker - MSFT wrote:
    Let me phrase that differently. Does the 32 bit Jet come on a 64 bit Vista. I does show up on 32 bit but doesn't appear on the 64 bit box. Is there an install somewhere for the 32 bit version on Vista ?


    I'm not aware of a package for Vista. The latest version is included with Vista so unless the components are updated I wouldn't anticipate a version specifically for Vista.

    You could try installing the latest version for Windows XP on 64-bit Vista. I don't have a 64-bit Vista configuration so I don't know whether the Jet OLEDB provider is installed for 32-bit compatibility.


    Monday, May 07, 2007 1:43 PM
  •  ChrisVine wrote:
    I've looked through my Data Access set-up via Administrative Tools and there is no Jet4.0 set-up in Vista by default. Any other suggestions?


    Not sure where you are looking, but the Data Sources (ODBC) Control Panel applet is for ODBC driver configuration and not OLEDB. For Jet and OLEDB you can look for the following files:

     

    msjet40.dll (Jet database engine)

    msjetoledb40.dll (Jet OLEDB provider)

    Monday, May 07, 2007 1:47 PM
  • This works perfectly in a Console App.  However how do i set the target platform property for an ASP.Net application as there is no compile tab availableSad

    Monday, May 07, 2007 10:00 PM
  • I agree with Nona....VERY HELPFUL Paul! You Rock!!!!

     

    Tuesday, May 08, 2007 1:55 AM

  • Should be there in Visual Studio 2005 right under the Application tab. You're not using an Express version are you?
    Tuesday, May 08, 2007 1:03 PM
  •  

    I am using the full version.  Actually when I use a Console App, the option for target platform does appear, but in the 2nd tab which is the "Build" tab .  For Web apps, the only tabs that are presented in VS.Net are References, Build, Accessibility, Start Options, MSBuild Options

     

    thanx!!!

    Wednesday, May 09, 2007 4:11 AM

  • And you see this after you have clicked on the Project menu item and selected <AppName> Properties... ?
    Wednesday, May 09, 2007 12:55 PM
  •  

    When a web project is selected we do not get a project menu.  Instead the menu item name will be "WebSite" and it doesnt have a <AppName> Properties item under it. 

    Saturday, May 12, 2007 7:37 AM

  • Below is the documentation for Web Site projects:

    How to: Configure Projects to Target Platforms

    Monday, May 14, 2007 1:42 PM
  • The help is either outdated or inaccurate.  As mentioned in my previous post the only options availablee are  References, Build, Accessibility, Start Options and  MSBuild for a web project
    Tuesday, May 15, 2007 5:18 AM

  • Try creating a Deployment Project:

    How to: Configure Projects to Target Platforms

    Tuesday, May 15, 2007 12:20 PM
  • Hi,
    I just had the same error and figured out that my connection string and path of the file had syntax errors. Correct one is:

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/xxxx/xxx.mdb"

     

    now it works.

     

    thanks

    • Proposed as answer by Air-Thanida Tuesday, February 21, 2012 4:13 AM
    Thursday, May 24, 2007 6:34 PM
  • Hi Paul,

     

    I have few doubts. One of this is already  a repeated qns.Could you plz clarify them. Still i have not even seen Vista OS, so sorry for basic qns.

     

    1) Does Windows Vista OS is available in 2 different versions ( 32 Bit OS & 64 Bit OS) ? Or both are in same Version?

     

    2) As said by you in one of the previous posts, that Microsoft Jet 4.0 is available only for 32 Bit Vista, then is it backward comapatible ( does that even support Win 2K,2k2,2k3,XP versions also )?

     

    3) Data connectivity components which are available for Office 2k7 supports backward compatibility ( supporting from Win 2k to latest one) ?

     

    4) Currently i have a stabilised application which had OLEDB Support for Win 2k, 2K2,XP. Now i would like my application to support Vista (which contains office 2007) also .

     

    regards,

    Mahesh

     

     Karakas wrote:

    Hi,
    I just had the same error and figured out that my connection string and path of the file had syntax errors. Correct one is:

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/xxxx/xxx.mdb"

     

    now it works.

     

    thanks

    Thursday, June 21, 2007 4:47 AM
  • how do i do this?

    i cant find the ADVANCED COMPILER OPTIONS

    Friday, June 22, 2007 2:01 AM
  •  

     mallamahesh wrote:

    1) Does Windows Vista OS is available in 2 different versions ( 32 Bit OS & 64 Bit OS) ? Or both are in same Version?

     

    There is both a 32 and 64-bit version of the OS.

     

     mallamahesh wrote:

    2) As said by you in one of the previous posts, that Microsoft Jet 4.0 is available only for 32 Bit Vista, then is it backward comapatible ( does that even support Win 2K,2k2,2k3,XP versions also )?

     

    Yes, Jet 4.0 is supported in all of the versions you mentioned (32-bit only).

     

     mallamahesh wrote:
      

    3) Data connectivity components which are available for Office 2k7 supports backward compatibility ( supporting from Win 2k to latest one) ?

     

    Yes, AFAIK.

     

     mallamahesh wrote:
       

    4) Currently i have a stabilised application which had OLEDB Support for Win 2k, 2K2,XP. Now i would like my application to support Vista (which contains office 2007) also .

     

    There shouldn't be any issue with respect to Jet OLEDB 4.0.

     

     

    Friday, June 22, 2007 6:07 PM

  • Regarding the Advanced Compiler settings, you may want to post your question to the Visual Basic IDE forum.
    Friday, June 22, 2007 6:17 PM
  • I am having the same issue.  I have a web site application that allows a user to upload an Excel file that is processed like a database using the Jet OLEDB and it works fine in a 32-bit environment but not in a 64-bit environment.  The web application consists of 3 projects - the website and two class libraries.  (Everything is written ib C#)  The "CPU target" is listed on the class library projects but NOT on the website project.  So how do I make my website run in 32-bit mode? (Windows xp-pro 64) OR is there another way that I can process an Excel spreadsheet like a database in my web application?  (It is not an option to run VSTO on the client machine to connect to the database.)

    Saturday, June 23, 2007 3:00 PM
  • I'm having the same problem (that is, "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered...etc").

    Thing is, I'm not using VB2005, I'm coding in C#, in Notepad, using an IIS server, on XP x64. Hence, I can't just change the VB options, or use a compile flag (or can I? I'm not incredibly familiar with IIS).

    Is there any way to get round this?

    Thanks!
    Tuesday, June 26, 2007 10:16 AM

  • If you want to run your ASP.NET app in 32-bit mode then you have run IIS in 32-bit mode. In addition, you cannot run IIS in 32 and 64-bit mode at the same time.

    How to switch between the 32-bit versions of ASP.NET 1.1 and the 64-bit version of ASP.NET 2.0 on a 64-bit version of Windows
    Wednesday, June 27, 2007 12:49 PM
  • I just found this and thought I'd share it. I'm using IIS7 on a Vista x64 box. On IIS7, there's an option to run your app in 32-bit mode. In the Advanced Options under the Application Pools where your app is, there's an option to Enable 32-bit Applications.
    Friday, July 20, 2007 4:47 PM
  • An alternate solution for some may be to use a csv file type instead of an xls file type.

    I originally uploaded csv files using simple procedures with Streamreader, RegEx, and other methods to parse a csv file.  These were unsatisfactory, prone to errors due to inconsistencies in csv structure and content.

    For a few years I used the ODBC text file driver. Then Microsoft depreciated ODBC.  I used the Ole DB data provider until my server upgrade to x64.  Both ODBC and Ole DB data providers do not work on x64, and I cannot alter to use IIS as 32 bit because of co-existing with Exchange 2007, which requires IIS 6.0 run only in x64 mode.

    So, for my ASP.NET needs, I first upload csv files to the user's temp folder.  Then my procedures check for the file existence, type, size, illegal file names and unexpected columns.   At that point, I use a custom class csv reader that does all the basic csv reader work that needs to be done.  Neither ODBC nor Ole Db is required.

    If you haven’t time to write-your-own, I recommend the cached version of the CSV reader by Sebastien Lorion, downloaded from

    http://www.codeproject.com/cs/database/CsvReader.asp

    Saturday, July 21, 2007 2:29 PM
  • Hii I am Ramesh Facing Same Problem that not installed Oledb Provider In pc

      And Not Running Query to Import Excel File  To database

      with Best Ragards

      Ramesh

     

     

     

    Monday, July 30, 2007 9:09 AM
  • I even got a worse combo.. i have MS office 2007, Windows Vista Ult. 64, and Visual Studio 2005 express edition.. so i got alot of compatiblilty issues.. can any one tell me a method of using databases in that invironment?

    Wednesday, September 12, 2007 5:54 PM
  • I even got a worse combo.. i have MS office 2007, Windows Vista Ult. 64, and Visual Studio 2005 express edition.. so i got alot of compatiblilty issues.. can any one tell me a method of using databases in that environment?

    Wednesday, September 12, 2007 5:54 PM
  •  Tomas570032 wrote:
    I write my web-page on ASP.NET on MS Visual Studio 2005 (Standart). When I try to launch my page on Development Server all is fine. But when I try to access it through IIS 7 I get the error in discussion. I am running Vista 64. How fix that?
    Thank you!

     

    Hi all, I was having the same problem as you running a WebApp that uses Microsoft Jet for importing some data from Excel, I was working with Windows Vista 64 bits after trying everything I found a workaround:

     

    In the IIS(7), search for the application pool that supports your Web Application rigth click on it and select the option "Set Application Pool Defaults"...then find the Option  Generals->Enable 32-bit Applications set it to true.

     

    And that's it! Microsoft Jet is working again.

    • Proposed as answer by Matt Brunell Tuesday, March 03, 2009 3:52 PM
    Monday, September 17, 2007 3:26 PM
  • That was legendary!  I have a 64 bit machine too, and I've been struggling for the last few hours on that one, and your solution got it working straight away.  Thank you.

    Tuesday, October 09, 2007 12:44 PM
  • I currently have 10 projects in my application.

     

    one of them is trying to use jet on 64bit windows.

     

    My main project includes this sub project and many other projects.

     

    Are you saying I have to change all my projects to target 32 bit, and can never have a 64 bit project because one of them happens to use Jet for a specific minor purpose?

     

    Because I changed the specific project to 32 bit, now I can't load the program at all because of incompatability between projects.

     

    Is there a way for my main 64 bit project to load and run a 32 bit dll?

     

     

    Thursday, October 25, 2007 7:19 PM
  • You cannot load a 32-bit component into a 64-bit process space. Unless Microsoft provides a thunking mechanism or a 64-bit version of Jet (not likely), I'm afraid we're out of luck.

     

    The only current alternative is to create linked servers to tables in Microsoft Access from SQL Server and reference these tables through SQL Server. This implementation is similar to the concept of linked tables in Microsoft Access.

     

    Friday, October 26, 2007 12:20 PM
  • Ken,

    I am getting the same message.  However, my system is Windows XP Home Edition.  I am using MS Visual Studio 2005 Std Ed.  Here is the code I am using: Dim cn As New OleDbConnection("Provider=Microsoft,Jet.OLEDB.4.0;Data Source=c:\"path".mdb;")  I have re-loaded MS Visual Studio 2005.  I have tried downloading MS Jet OLEDB.4.0 and get a message that says my current version is newer than the download version. I have run the Serv32(? I don't remember the exact serv name right now) option to re-register the oledb files and it tells me registration successful.    If I use the data connection wizard in Visual Studio, and test the connection, it tells me that the connection is successful.  I have not figured out how to use the xsd created by the connection wizard in my code.  The pecular thing about this is that I took my code to a friend and ran it on his computer running XP Home Ed..  We downloaded VB Express.  The code worked.  I downloaded VB Express and when I run the code I continue to get the "not Registered" error message.  Do you have any advice/suggestions on how to proceed to make this work?  It seems to me that there is something different in the settings on my machine that is not allowing the code to work.  Which settings, I don't have a clue.

    Thank you for any assistance you may be able to provide.

    Onedoor

    Tuesday, November 06, 2007 7:23 PM
  •  

    (quote)

    The only current alternative is to create linked servers to tables in Microsoft Access from SQL Server and reference these tables through SQL Server. This implementation is similar to the concept of linked tables in Microsoft Access.

    (end quote)

     

    Paul, that's exactly what we want to do and what isn't working for us.  What is the right way to create a linked server to read and write Access .MDB files from a 64 bit SQL Server 2005 via ADO?

     

    We are interoperating with another vendor's Access application and cannot just bring the MDB files into SQL Server for storage.

     

    Thanks

     

     

    Friday, December 07, 2007 9:33 PM
  • Something really quick for those who wan to configure Visual Studio Web Express to execute under X86 runtime.

    Replace your configuration tag in your web.config with this:

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

     

    It work for me.

    Not really know all they impact.

    Need to test a bit.

    Please let me know if it's work for you.

     

    Eric.

     

    Tuesday, December 11, 2007 7:49 AM
  • Oups, an i forgot the most important part....

    I Switch to true Enable 32-Bit Applicaitons into de Advanced Setting of my DefaultAppPool in Internet Information Services Manager.

    Create a new pool if you have 64bit depending code else where.

     

    Voila !

    Eric.

     

    Tuesday, December 11, 2007 8:39 AM
  • The other solution is to move access database to SQL Express.  I just did that on Windows Server 2008 64bit, SQL 2005 Express and used Visual Studio 2008 standard.  Worked fine.  It would nice if someone would write the 64bit for access, although the conversion of Access to SQL Express was so simple I can see why it is not a priority.

    Saturday, July 12, 2008 6:21 AM
  •  Ken Tucker wrote:

    There is not a 64 bit version of jet that is why you get that error.  To force your app to use the 32 bit change the target cpu to x86 in the advanced compiler options.

    http://www.vb-tips.com/default.aspx?ID=c8303e25-496d-4288-bc1d-58e5850daf5e

     

    In my case, i receive this error in Reporting Services.  How can i change this option?

     

    Thanks

    Tuesday, July 15, 2008 7:57 PM
  • hi,

     

    i have same problem but still no any solution Work What i did is ..

     

    i build a website project under vs2005. i worked on windows server 2003 64 bit. i have to upload a excel sheet and import data from excel to SQl. using MS.jet.oledb.4.0. this work at preview. but gives error when i run this website project to MOSS site.

    i use the connectioon string.

    "Provider=Microsoft.Jet.OLEDB.4.0;" +

    "Data Source= ".xls;" +

    "Extended Properties=Excel 12.0; HDR=Yes;IMEX=1";

    OleDbConnection conn = new OleDbConnection();

    conn.ConnectionString = strConn;

    try

    (

    conn.Open();

    }

    catch (Exception Ex)

    {

    // here error Comes

    }

     

     

    when conn.open exceute it's give Error.

     

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

     

    Please Give Me Solution it's very urgent.

    Friday, November 07, 2008 11:43 AM
  • The Jet OLEDB Provider cannot be loaded from a 64-bit application and there is no 64-bit version of this provider. If you read the complete thread there should be a post that indicates how to configure IIS run your app as a 32-bit process instead.

     

    Friday, November 07, 2008 1:59 PM
  • Thanks a Lot,

     

    but i have a doubt that our site is running on 64 bit server(64 bit MOSS). if i config IIS (6.0)  again  to 32 bit.which is now configured for 64 bit. then there may be some problem on MOSS site Like slow performance , low optimization.

     

    and may be some problem regarding all web service and web projects.

    SO what other alternative are there.

    i have a link http://support.microsoft.com/default.aspx/kb/894435 it is sufficent ?

     

    Regards..

    Ankit jain

     

     

    Saturday, November 08, 2008 10:14 AM
  • I'm getting the same error as in the OP. Here is my code:

    Imports System.Data.OleDB
    Public Class Form1
        Dim myConnection As New OleDbConnection


        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Michael\Desktop\CTB Project\CTB Project\CTB Project\CTB Database.mdb"
            Dim myDataAdapter As New OleDbDataAdapter("Select Venue_Name From Concert_T Where 'Venue_ID = Purchase.VenueIDValue.Text'", myConnection)
            Dim myDataSet As New DataSet
            myDataAdapter.Fill(myDataSet, "Concert_T")
            DataGridView1.DataSource = myDataSet.Tables("Concert_T")
        End Sub
    End Class




    I'm getting an error on the
    myDataAdapter.Fill(myDataSet, "Concert_T") line.


    Can someone tell my what my problem is please? I'm a total novice trying to make something work.
    Sunday, December 07, 2008 6:46 AM
  • Which version of Windows are you running under and is it the 32-bit or 64-bit version?

     

    Sunday, December 07, 2008 1:04 PM
  • I'm using 32-bit. I actually got the connection fixed but now the query is pulling all Venue_names from the table, and I only want the gridview to display the one Venue_Name that matches the VenueIDValue label. Do you know where I went wrong?

    Thanks
    Sunday, December 07, 2008 4:32 PM
  • Could you post a new thread please and include your code so we can see what you're doing. Thanks.

    Monday, December 08, 2008 3:15 AM
  • Sorry. Link
    Monday, December 08, 2008 3:27 AM
  • In the i386 folder find msjetoledb40.dll.  I copied this file into the Microsoft Visual Basic 2005 Express Edition folder in the Program Files for the MS Visual Studio folder.  I'm not sure copying this file was necessary.  What is necessary is to run the following command.  regsvr32 msjetoledb40.dll.   This causes this dll to be registered.

    Tuesday, December 09, 2008 5:19 PM
  • Private cs As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\tsclient\C\ALTDBF;Extended Properties=dBASE IV;"
    Private da As New OleDbDataAdapter("SELECT * FROM PAYRHEAD.DBF", cs) 

    Thank you. I was running into the same problem and changing the target CPU to x86 fixed the problem:
    Friday, February 06, 2009 9:26 PM
  • Hi!

    I have tried all the above mentioned ways to solve the problem "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine" but none of them have worked. I have a 64 bit server, I tried with cangng my code to 32 bit.. it failed. alter that I tried with solution mentioned in "http://support.microsoft.com/default.aspx/kb/239114", even this one failed.

    Does any one have a concrete solution to the problem.




    Thursday, February 26, 2009 7:04 AM
  • My Dear Friend,

    i faced this Problem and finally i Tried Alternative.

    u have to use Excel Object in Programming .

    and Problem will be Solved.

    Regards
    Ankit jain
    Friday, March 06, 2009 6:22 AM
    • Proposed as answer by Mike Vickers Friday, April 30, 2010 10:52 PM
    Wednesday, April 29, 2009 8:04 AM
  • Ankit,

    If i understand you correctly, 

    Do you have 64 but application on 64 bit OS ? 

    i am planning to migrate to 64 bit OS server and all the apps are also in 64 bit.  Some portion of code tries to import the excel file and i get the familiar error mention in the chain.


    Is there any solution ?

    Regards
    Umesh
    • Proposed as answer by Mike Vickers Friday, April 30, 2010 10:52 PM
    Tuesday, May 12, 2009 2:48 PM
  • Umesh,

    Do you have the "Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine" error message ?
    If so, use the link I posted just below. It will explain how to fix the problem on a 64 bit OS.
    I had the problem and I solved it.

    Regards
    Claude
    Tuesday, May 12, 2009 5:42 PM
  • i think..

    This sole only Problem Regarding

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

    u just take object of excel and do work in c#.



    Regards
    Ankit Jain
    Saturday, June 06, 2009 6:28 AM
  • Hi Ankit,

    Could you post the code how to take the object of excel and do it?
    My requirement is to read an excel file in a specific path and process it. My code as follows:

    private

     

     

    DataSet ProcessFile(string pathName, string fileName)
    {
          OleDbConnection ExcelConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathName + ";Extended Properties=Text;");
          OleDbCommand ExcelCommand = new OleDbCommand(@"SELECT * FROM " + fileName, ExcelConnection);
          OleDbDataAdapter ExcelAdapter = new OleDbDataAdapter(ExcelCommand);
          ExcelConnection.Open();
          DataSet ExcelDataSet = new DataSet();
          ExcelAdapter.Fill(ExcelDataSet);
          ExcelConnection.Close();
          return ExcelDataSet;
    }

    It is giving out "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine." error. How can I solve it?

    Thanks,
    Sharmin
    • Edited by Sharmin Jose Monday, June 08, 2009 4:31 PM Formatting
    Monday, June 08, 2009 4:15 PM
  • Yes You can use this code to read excel file from your C# Code..

    there is a button in dot net page ...and it's a code behind...

    protected void btnAttachFile1_Click(object sender, EventArgs e)
        {


            try
            {
                DataTable m_TaxData = new DataTable("TaxData");
                DataColumn dcSource = new DataColumn("DataSource");
                DataColumn dcDest = new DataColumn("Destination");
                DataColumn dcLen = new DataColumn("Length");
                DataColumn dcID = new DataColumn("ID");
                m_TaxData.Columns.Add(dcID);
                m_TaxData.Columns.Add(dcSource);
                m_TaxData.Columns.Add(dcLen);
                m_TaxData.Columns.Add(dcDest);
                ViewState["TaxData"] = m_TaxData;

                ddlSourceFields.Items.Clear();
                btnRemoveSelected.Visible = false;
                if (FileInput1.HasFile)
                {
                    lblMessage.Visible = false;
                    string extn = FileInput1.FileName;
                    if (ddlDataSource1.Text == "XLS")
                    {
                        ddlSheetName.Items.Clear();
                        FileInfo fiinfo = GetFileOnServerInfo();
                        string path = fiinfo.FullName;
                        //Session["FilePath"] = fiinfo.FullName;
                        ViewState["FileName"] = fiinfo.FullName;
                        string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
                                "Data Source=" + path + " ;" +
                                         "Extended Properties=Excel 8.0;";
                        OleDbConnection conn = new OleDbConnection(strConn);
                        conn.Open();
                        DataTable dt1 = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "Table" });
                        int count = dt1.Rows.Count;
                        for (int count1 = 0; count1 <= dt1.Rows.Count - 1; ++count1)
                        {
                            //ddlSheetName.Items.Add(dt1.Rows[count1]["TABLE_NAME"].ToString ());
                            ddlSheetName.Items.Add(dt1.Rows[1]["TABLE_NAME"].ToString());
                        }
                        string tableName = dt1.Rows[1]["TABLE_NAME"].ToString();
                        lblSheetNames.Visible = true;
                        // ddlSheetName.Visible = true;
                        btnGetFields.Visible = true;
                        conn.Close();
                        //new codes
                        string str_con = "SELECT * FROM " + '[' + tableName + ']' + "";
                        conn.Open();
                        OleDbDataAdapter myCommand = new OleDbDataAdapter(str_con, conn);


                    }
                    if (FileInput1.HasFile)
                        txtFileName.Text = FileInput1.FileName;
                    ExecuteConnection con = new ExecuteConnection();

                }
                else
                {
                    WebMsgBox.Show("No file is selected");
                    return;
                }
                dt = null;
                ViewState["Table"] = null;
                grdLoaderRules.DataSource = dt;
                grdLoaderRules.DataBind();
            }
            catch (Exception exx)
            {
               
            }
        }




        public FileInfo GetFileOnServerInfo()
        {

            try
            {
                string fp = Server.MapPath("");
                fp = fp + "\\\\LoaderMap";

                if (Directory.Exists(fp) == false)
                {
                    DirectoryInfo dc;
                    dc = Directory.CreateDirectory(fp);
                    dc = null;
                }

                string Time = System.DateTime.Now.Ticks.ToString();

                fp = fp + "\\\\" + Time + (FileInput1.FileName) + "";

                if (System.IO.File.Exists(fp) == true)
                {
                    File.Delete(fp);
                }
                FileInput1.SaveAs(fp);

                FileInfo FICSV = new FileInfo(fp);
                if (FICSV.Extension == ".xml" | FICSV.Extension == ".xls" | FICSV.Extension == ".csv" | FICSV.Extension == ".txt")
                {
                }
                //Do Nothing
                else
                {
                    FICSV = null;
                }
                return FICSV;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }



    Regards
    Ankit Jain



    Tuesday, June 30, 2009 12:17 PM
  • Awesome info!  Thanks a ton.  I'm currently porting a site over, and couldn't make the old one run on my new laptop.  This did the trick!


    Jamie Nordmeyer
    Sunday, July 12, 2009 7:34 PM
  • Yes You can use this code to read excel file from your C# Code..

    there is a button in dot net page ...and it's a code behind...

    protected void btnAttachFile1_Click(object sender, EventArgs e)
        {

    ... }
    Didn't work for me either. I still get the "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine" error.

    Setting the IIS 7 to "Enable 32 bit" doesn't work for me either, as I have other assemblies that HAVE to run in 64bit, and if you set your IIS to 32bit, why have a 64bit server in the first place anyway?

    Forcing the assembly to compile to x86, doesn't work either, as I have other assemblies again using this assembly, which doesn't work as the 32bit assembly isn't recognized...

    What do I do here... can you somehow specify a seperate AppPool for a specific location in the website? Then I could have this particular part of my site running in 32bit, as it will run in another AppPool...I guess this isn't possible, but I don't have anymore ideas.

    Hope someone can help!
    Tuesday, July 14, 2009 1:14 PM
  • laumania said "Didn't work for me either. I still get the "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine" error."

    Right, I am in the same boat and I think we need to get the jet ole drivers on there first. I am running vista sp2, 64bit and my machine does not have any jet drivers that I could find. I deployed a vs 2005, 2.0 framework desktop app to this machine and cant get past the provider error. I have tried all of the tricks listed in this thread.
    Wednesday, July 15, 2009 8:58 PM
  • For those people with a Visual Studio Express Edition and want to compile in x86 (since VS Express doesn't expose the option) do the following:
    1. In Windows Explorer, right-click your project file (*.csproj, *.vbproj, etc..) and Open With > Notepad (the project file is an XML document)
    2. Find the section <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> and <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    3. Find (or add) the element <PlatformTarget>x86</PlatformTarget>
    4. Save and close Notepad.  
    5. Reload your project and compile.
    This worked on 64bit Vista using C# Express 2008 for me.  Good luck.
    Wednesday, August 12, 2009 9:51 AM
  • Vista 64-bits SP1, VS08 SP1, .NET 3.5 SP1, C#;
    I was getting the same error but I changed in the Project Explorer -> Properties -> Build -> Platform Target: x86 and both the oledb using jet 4.0, and the ODBC connections work without any problems. I'm testing using both type of connections against the Nwind.mdb examples. Neither of my connections works to access a Nwind.accdb
    Sunday, September 13, 2009 9:07 PM
  • I know this is an old post, and the JET is deprecated - but I can't find a better solution for reading Acces mdb files, and the problem on this thread only concerns a few W7 x64 users.

    Switching to force x86 compilation has solved the problem for most Windows 7 x64 users of my .NET desktop application, but not all. The remaining problems are sometimes on fresh W7 installs, sometimes on upgrades, and none of the downloads from http://support.microsoft.com/kb/239114/en-us or the info on http://support.microsoft.com/?scid=kb%3Ben-us%3B271908&x=16&y=4 has been of any help to anyone. No mention is made of Windows 7 anywhere, and the downloads will not install.

    Windows Update doesn't help either, and none of the many solutions I've tried suggesting have solved this either - such as installing Access, using persistent=true in the connection string, reinstalling NET. 1.1, 2.0, installing MACD <= 2.5, clean install of MACD plus the JET 4 sp3 version 8... 

    The only solution I have not yet tried is LarryWWW's suggestion about reregistering the 5 dll's; hopefully I'll soon have someone with this issue who knows how to browse from a cmd prompt, as I don't yet have access to a Windows 7 x64 machine - and as I said, now my app is compiled for x86 the majority of W7 x64 users don't have the problem...

    The machines in question DO have msjet40.dll version 4.00.9756.0 installed in wOw folder (a version not even mentioned on the above MS Kb articles), however the error persists.

    Do IIS settings affect the way an ordinary desktop .NET app runs?
    Is this is likely to be a rights problem, or a MACD or Jet Version problem?
    Or will the re-registering trick from http://support.microsoft.com/?scid=kb%3Ben-us%3B278604&x=10&y=15 work for sure?

    Thank you for any help,
    Neil
    Tuesday, November 24, 2009 10:03 PM
  • Dear bigstu80.....

    Thank you for your solutions. I am jus a learner and cracked my head to open ms access database but your solutions worked for me.

    Monday, November 30, 2009 5:23 PM
  • Paul, I'm sorry but throughout this thread you keep saying there is no 64-bit Jet OLEDB provider and that is simply not true.  Jet is included in Enterprise Server, which is  a 64-bit-only system, and it runs in native 64-bit mode.

    For some reason, despite a lot of hollering, the driver included in Enterprise Server is not and will not be included in the 64-bit PC operating systems.  It is odd that it was intentionally excluded since backwards compatibility seems to be a singular Microsoft obesssion...

    Technically you're right; but absolutely?  Not quite.

    Cheers!

    Tinker
    Tuesday, December 01, 2009 5:16 PM
  • This really helped me. It definately got my application working.

    My question is: is there any performance issues with running the application in WOW64 mode? Will there be any big performance losses on a web application, compared to running on 64-bit mode?

    regards.
    Wednesday, December 09, 2009 10:18 AM
  • Thank you ... you saved my project.  I have a delivery deadline in two days, and I had left the reporting for the end thinking it would be easy to connect to Excel--and then I encountered this silly error with the misleading error message.  Thank you again.  (PS: As a more material gesture of saying thank you, I commit to trolling the forum regularly, and responding to others' pleas for help.)
    Wednesday, December 16, 2009 6:39 PM
  • The idea of using SQL Server as the solution does not work for us, as over the last 10 years we have installed numerous editions and never had a stable installation.  OK, maybe one time on NT4 back in the 90's.  Access just works and does not require an on-site MVP, although it may need a compact and repair once in a while.  So if Access is not available on 64 bit, we will seek another, workable solution, probably from a 3rd party.

    We did get our application (the one using Access) working by compiling x86 all the way down the stack of dependent libraries.  It was a headache, but it works, though now we are restricted to 3GB of RAM, so we fixed one problem and created another, unworkable one.  After we pass the current deadline, we'll go find a workable 64 bit database and go back to "Any CPU".

    FYI: We are on Windows 7, 64 bit.

    Thanks.
    Tuesday, December 22, 2009 1:11 AM
  • Really helped me and solved the problem! 

    All though, follow up question: what are the consequences, performance? Will there be a 64-bit version and what is the alternative if not?

    regards

    Monday, December 28, 2009 1:56 AM
  • There is already a 64-bit version of jet/ace driver by MS available (with office 2010 beta):
    http://blogs.msdn.com/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx
    • Proposed as answer by TechVsLife2 Thursday, February 25, 2010 5:02 AM
    Monday, February 01, 2010 4:50 AM
  • Well, I just downloaded it and instead of "Jet 4.0 not registerd on local machine" I get "Microsoft.ACE.OLEDB.14.0 nor registered on localmachine."

    No errors during install. I'm using this as my connection string

    AccessConnection =

    New OleDbConnection("Provider=Microsoft.ACE.OLEDB.14.0;Data Source=C:\Users\Peter\Documents\Visual Studio 2008\Projects\nodesnamespace\nodesnamespace\nodes.mdb")


    I've tried to set my app as x86 but that didn't help either.


    Any one know what the file name(s) is so I can try to manually register them? How do you register a 64 bit dll?


    Any help would be apreciated.


    Old Programmer
    Thursday, February 18, 2010 1:29 AM
  • Use Provider=Microsoft.ACE.OLEDB.12.0 instead. This is a bug in beta version. Read details in my blog.
    Paul Shkurikhin blog.sharepointalist.com
    • Proposed as answer by TechVsLife2 Thursday, February 25, 2010 5:01 AM
    Saturday, February 20, 2010 5:45 AM
  • In reply to bigstu80 :

    Thank you very much for the "<PlatformTarget>" trick !

    It worked for me too (64 bit Windows Server 2008 using VB Express 2008).

     

    Tuesday, March 23, 2010 2:44 PM
  • Hello Ken !

    Great man ! I solve my problem reading your post.

    Some time we do like the bee, we don't see the open window... and so we continue to crash our head against the glass.

    Thank You & bye bye

    Nick 

    Thursday, May 13, 2010 4:30 PM
  • 4 years later and this post is still helping people! Thanks :)
    Friday, July 09, 2010 11:42 AM
  • Hi,

    to avoid this kind of compatibility issues and subtle problems that takes days to figure out, I recommend you take a look at this Excel .NET library.

    Written in pure managed code, it doesn't use Excel Automation , has its own parsing engine which makes it very fast.

    Object model is very intuitive and easy to use. Methods like DataTable to Excel or Excel to DataTable are very helpful.

    Here is a Excel C# code snippet how to export DataSet to Excel :

    // Create new ExcelFile.
    var ef = new ExcelFile();
    
    // Imports all the tables from DataSet to new file.
    foreach (DataTable dataTable in dataSet.Tables)
    {
      // Add new worksheet to the file.
      var ws = ef.Worksheets.Add(dataTable.TableName);
    
      // Insert the data from DataTable to the worksheet starting at cell "A1".
      ws.InsertDataTable(dataTable, "A1", true);
    }
    
    // Save the file to XLS format.
    ef.SaveXls("DataSet.xls");
    

    Tuesday, July 13, 2010 9:17 AM
  • Hi.

    I got some similar problem .

    My pc:Vista 64-bits SP1, VS08, .NET 3.5 , C#;

    The project was made on a XP 32-bit and i need to put it on another pc with Vista but it doesn't work.

    the code i use :

    com = new SqlCommand("INSERT INTO dbo.Profesori SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=" + textBox_Filepath.Text + ";HDR=YES;', 'SELECT * from [Sheet1$]')", con);

    I tried some solutions from thie post:

    -i thought its the code even if on the XP pc it works and changed it but didn't fix it

    -platform change but didnt work on x86 nor on x62

    -the ISS(got 6.0) still nothing

    -used the msjet40.dll transfer from system to system 32nothing

    If anyone can help me i would appreciate a lot.thanks

    • Edited by Costi1988 Tuesday, July 13, 2010 10:41 AM
    Tuesday, July 13, 2010 10:28 AM
  • Since post is very long here, you need to be more specific about "similar problen". Do you receive any error? Did you install proper Jet OLEDB provider? You cannot just transfer  msjet40.dll file, itr would be not enough. Also with Jet provider you must compile your .NET application in 32-bit mode, otherwise it will start in 64-bit mode on Vista and Jet will fail.
    Val Mazur (MVP) http://www.xporttools.net
    Tuesday, July 13, 2010 10:35 AM
    Moderator
  • sorry 

    the error is : The OLE DB provider "Microsoft.Jet.OLEDB.4.0;" has not been registered.

    About the install since i found the msjet40.dll i thought its installed already plus most sites say that vista got it installed.

    i tried setting the debug on x86 but it didn't let me set a platform


    Tuesday, July 13, 2010 10:54 AM
  • Sounds like Jet is not installed. You can find installation for it here

    http://www.microsoft.com/downloads/en/results.aspx?freetext=jet+sp8&displaylang=en&stype=s_basic

    But keep in mind that Jet does not work if application runs in 64-bit mode. If you need to run it in 64-bit mode, you need to use ACE OLEDB provider which you could find here

    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d

    Another option is to use ExcelReader component from my website. It works in both 32 and 64 bit modes and native to .NET

     

     


    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, July 14, 2010 10:21 AM
    Moderator
  • Compile with Target CPU = x86
    Wednesday, August 04, 2010 7:58 AM
  • hi i didn't know how to force my application to use the 32 bit please give some idea
    Tuesday, August 10, 2010 10:33 PM
  • Ray,

    Thanks so much as I am running IIS7 on a Windows 2008 server.  I am using Visual Studio 2008 to develop the website.  I have serveral websites running on this server.  The data driven sites are using SQL Express 2005 in 64bit mode.  I changed the website using the Microsoft jet oledb 4.0 to 32bit mode and the site started worked fine.

    Very Helpful.

    Dick

    Tuesday, August 31, 2010 10:46 PM
  • thank you this was helpful.
    Tuesday, September 28, 2010 5:36 PM
  • Hi,

     

    I've an application with asp pages and I needed to migrate it on WS2K3 X64. In this application I've a connection to the mdb file.

     

    <%
    	Dim objConn, DSNTest
    	Set objConn = Server.CreateObject("ADODB.Connection")
    	Dim dbpath
    	dbpath = Server.MapPath("..\database\let.mdb")
    	DSNTest="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbpath&";User ID=;Password=;"
    	objConn.open DSNtest
    %> 
    

     

    I had the message "Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine". I installed Microsoft Access Database Engine 2010 Redistributable

    And change the code above into 

     

    <%
    	Dim objConn, DSNTest
    	Set objConn = Server.CreateObject("ADODB.Connection")
    	Dim dbpath
    	dbpath = Server.MapPath("..\database\let.mdb")
    	DSNTest="Provider=Microsoft.ACE.OLEDB.12.0;Data Source="&dbpath&";User ID=;Password=;"
    	objConn.open DSNtest
    %> 

     

    But now I've another error message: "Microsoft Access Database Engine error '80004005'


     

    Thursday, October 28, 2010 1:52 PM
  • Thanks, Ken.  I was having this issue and your solution worked.
    Monday, November 08, 2010 10:29 PM
  • Well Ken. Its now 2011 and this still worked for me in VS 2008!!

    Thanks

     

    Martin g

    Wednesday, January 05, 2011 3:13 PM
  • Thanks Ken.

    Your response saved me hours of work. Changing the target cpu to x86 and re-compiling made the app I'm developing work on Windows 7 64 bit even though it uses Jet 4.0 databases.

    Whew....

    Friday, January 07, 2011 7:42 PM
  • http://support.microsoft.com/kb/942977 it tells you what to do :) enjoy :) Method 1 Force the application to be compiled as a 32-bit application. To do this, follow the steps in the appropriate section. Steps for Microsoft Visual C# projects 1. In Solution Explorer, right-click the application, and then click Properties. 2. Click the Build tab. 3. In the Platform target list, click x86. 4. On the File menu, click Save Selected Items. Steps for Microsoft Visual Basic projects 1. In Solution Explorer, right-click the application, and then click Properties. 2. Click the Compile tab. 3. On the Compile tab, click Advanced Compile Options. 4. In the Advanced Compiler Settings dialog box, click x86 in the Target CPU list, and then click OK. 5. On the File menu, click Save Selected Items. Back to the top Method 2 Use Microsoft SQL Server Express Edition instead of Access. The benefits of using SQL Server Express Edition are as follows: * You can use the 64-bit version of SQL Native Client to connect to SQL Server Express Edition. SQL Native Client contains the SQL Server OLE DB provider and the SQL Server ODBC driver. * SQL Server Express Edition is free. * Only a 32-bit version of SQL Server Express Edition is available. However, you can still use the 64-bit version of SQL Native Client in the application to connect to SQL Server Express Edition. To obtain SQL Server 2005 Express Edition, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/express/bb410792.aspx (http://msdn2.microsoft.com/en-us/express/bb410792.aspx)
    Sunday, January 09, 2011 3:28 PM
  • Project Properties...Compile tab...Advanced Compile Options button ...Target CPU dropdown.

    It works. No wonder. I'm privileged to have this bit of wisdom. It completely resolves my problem.

    Thank you Eric11 for the question and Paul P Clement IV for the answer.

    Paras.

    Friday, January 28, 2011 4:00 PM
  • If you don't have an application that you are building and are using a 64bit OS then change your IIS server settings to handle 32 bit apps. Instructions below:

    http://blog.nkadesign.com/2008/windows-2008-the-microsoftjetoledb40-provider-is-not-registered-on-the-local-machine/comment-page-1/#comment-13556

     

     


    Adam Bruss
    Wednesday, February 23, 2011 4:08 PM
  • Connecting to MS Access on Windows 64-Bit

     

    Folks, like many of you I struggled with the deprecation of JET 4.0 in Windows Vista/7 on 64-bit machines. A process running simply for years, ported to a faster machine simply stopped working with the error: 'Microsoft.Jet.OLEDB.4.0' provider is not registered. I was annoyed at the lack of notice from MS and lack of clear instructions. After tinkering I found the solution and I’ll post it first directly, with details after, for the benefit of those just as frustrated as I. The situation I describe is for VB, but may work in other code/environments.

     

    1. Download and run AccessDatabaseEngine_x64.exe

     

    (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d&displaylang=en)

     

    2. Change the connection string in your code to:

     

    Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ= <-db name and path here

     

    There is no need to upgrade/replace JET or emulate 32-bit connections. You don’t have to buy a new version of MS Office/Access, Access does not even need to be installed on the machine, you just need the driver. No need to convert to SQL Express. My legacy code is now running flawlessly on Windows 7 quad 64-bit machine without any office apps installed.

     

    When I first encountered the issue I tried to replace/upgrade JET but it was not available for 64-Bit and there were no plans to create it. Apparently, there is now a version released for 64-bit windows but you don’t need it. The MS Access Driver exists on older platforms as well and can be used instead of JET on 32-bit machines as well. However, there is one important detail concerning “*.accbd”, you must include this in the string or it wont work. Many examples posted on the web look like this: Driver={Microsoft Access Driver (*.mdb)} But it will produce an error in some cases indicating the DB and driver were not supplied in the string. *.accdb needs to be included as well.

     

    Replace: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=

     

    With: Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=

     

    Full pseudo code:

     

    dbLocation = "C:\dbstore\myAccess.mdb"

    Set objADO = CreateObject("ADODB.Connection")

    objADO.Open "Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" & dbLocation

     

    All other SQL calls and objects are unchanged.

     

    Have not tried yet in C++, or with Excel, or as a DNS location, but test it yourself.

    • Proposed as answer by wizdude Wednesday, August 31, 2011 6:05 AM
    Wednesday, May 18, 2011 3:36 PM
  • Thank you a lot for the trip!!.. Really annoying this bad behavior in a 64b machine.

    Best regards

    Tuesday, June 07, 2011 10:40 PM
  • Paul - thank you . This "Project Properties...Compile tab...Advanced Compile Options button...Target CPU dropdown" Works perfect :) You saved me some time, thank you

    Tom
    Chicago Web Design

    Wednesday, July 13, 2011 1:49 PM
  • Thank you Tomas4. It is helpful even today!!
    Sunday, July 31, 2011 2:24 PM
  • thanks for this. works a treat. i used this technique to resolve an issue with a customer website running on an SBS2011 server.

    cheers, wizdude.

     

    Wednesday, August 31, 2011 6:05 AM
  • Thank Ken....................
    Friday, February 10, 2012 7:04 AM
  • Thanks Sir its really helpful for me
    Friday, March 02, 2012 10:06 AM
  • Can reference http://www.cnblogs.com/insus/articles/2014059.html.

    This worked for me...change IIS 7 app pools to allow 32-Bit applications.
    Monday, April 30, 2012 7:41 PM
  • I have been reading this entire thread, and found a simple solution that worked for me...

    Change the provider from "Microsoft.Jet.OLEDB.4.0" to "Microsoft.ACE.OLEDB.12.0"

    In my app, that fixed everything....

    Friday, September 07, 2012 5:51 PM
  • we have an issue when we move an applicaiton v2.0 to windows server 2008 R2 we have an issue "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine"

    Download Microsoft Access Database Engine 2010 Redistributable (of course you'll need to choose the right bit for your server), and install it on your server

      • Change your connection string in your code or configuration file from
        Provider=Microsoft.Jet.OLEDB.4.0;
        to
        Provider=Microsoft.ACE.OLEDB.12.0;
    UPDATE: Microsoft has released a service pack for the Database Engine which is available at  http://www.microsoft.com/en-us/download/details.aspx?id=26605.

    Ravishankar Maduri MCTS,MCPD,MCP

    • Proposed as answer by TinusTrotyl Thursday, February 07, 2013 10:46 PM
    Thursday, October 18, 2012 6:52 PM
  • we have an issue when we move an applicaiton v2.0 to windows server 2008 R2 we have an issue "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine"

    Download Microsoft Access Database Engine 2010 Redistributable (of course you'll need to choose the right bit for your server), and install it on your server

      • Change your connection string in your code or configuration file from
        Provider=Microsoft.Jet.OLEDB.4.0;
        to
        Provider=Microsoft.ACE.OLEDB.12.0;
    UPDATE: Microsoft has released a service pack for the Database Engine which is available at  http://www.microsoft.com/en-us/download/details.aspx?id=26605.

    Ravishankar Maduri MCTS,MCPD,MCP

    For me it worked to get rid of "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered ..."! Thanks, Ravishanker!
    • Edited by TinusTrotyl Thursday, February 07, 2013 10:49 PM
    Thursday, February 07, 2013 10:47 PM
  • There is not a 64 bit version of jet that is why you get that error.  To force your app to use the 32 bit change the target cpu to x86 in the advanced compiler options.

    http://www.vb-tips.com/default.aspx?ID=c8303e25-496d-4288-bc1d-58e5850daf5e

    Thanks a lot Ken!

    In my case, my default project settings was pointing to x86 already - i just changed it to Any CPU and it worked:)


    Computer is a box with magic called software.

    Saturday, November 16, 2013 5:05 PM