The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine, Windwos 7

Answered The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine, Windwos 7

  • Thursday, February 04, 2010 10:50 PM
     
     
    I have an application running in windows vista, when I install on my new laptop in windows 7 appear the next leyend The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine, this app was created with VB but I don't have de sources, what can I do?

All Replies

  • Friday, February 05, 2010 8:39 AM
     
     Answered
    Hello,

    Are you running your application on x64 or x86 version of Windows?
    Also are you the developer that wrote the code for OCR.Form1 class?

    If so, I would suggest changing the Platform Target build option for your application to target x86 rather than Any CPU. Currently it appears that you are loading some assemblies out of the x64 GAC which would indicate that you are running x64 windows and Microsoft.Jet.OLEDB.4.0 provider is not 64-bit compatible.

    To resolve this issue open the project in Visual Studio then:

    1. From the solution explorer right-click your project then click Properties
    2. Click the Build tab
    3. Change Platform target from: Any CPU to x86
    4. Re-build your solution

  • Wednesday, February 10, 2010 5:55 AM
    Moderator
     
     Answered
    This error indicates that you may not have the latest Microsoft.Jet.OLEDB.4.0 on your computer, I recommend you to obtain the latest service pack for the Microsoft Jet 4.0 Database Engine and keep a Jet 4.0 database in top working condition. Moreover, since it is more of coding issue, I kindly recommend you to post your question in MSDN forum for a better assistance.

    References:

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

    Best Regards
    Dale
  • Sunday, March 13, 2011 5:59 PM
     
     
    Thank you so much........
  • Friday, August 26, 2011 5:39 AM
     
     

    I 2 got the same issues.

    Thanks magon.

    Its working fine for me.

  • Wednesday, November 16, 2011 2:03 PM
     
     

    it really worked....thanks for your support.

  • Thursday, November 17, 2011 11:26 AM
     
     

    i tto am having similar issue

    but if i change the target Change Platform target from: Any CPU to x86

    will it effect anything else?

    as i get eror

    Could not load file or assembly 'MYPRJ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.BadImageFormatException: Could not load file or assembly 'MYPRJ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [BadImageFormatException: Could not load file or assembly 'MYPRJ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
       System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
       System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
       System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
       System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
       System.Reflection.Assembly.Load(String assemblyString) +28
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

    [ConfigurationErrorsException: Could not load file or assembly 'MYPRJ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
       System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
       System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
       System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
       System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
       System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86
       System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
       System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
       System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
       System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
       System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
       System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
       System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160
       System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

     


    svk
  • Wednesday, December 14, 2011 4:40 PM
     
     Proposed

    If this is in IIS Box try this

    You need to run Access database applications in a 32 bit asp.net application pool.  You do that via your IIS admin.

    Open IIS manager, select Application Pools, select the application pool you are using, click on Advanced Settings in the right-hand menu.  Under General, set "Enable 32-Bit Applications" to "True".


    R A J
    • Proposed As Answer by MarcoVico Monday, April 30, 2012 1:24 PM
    •  
  • Saturday, December 24, 2011 5:17 PM
     
     

    thank u 

     

  • Tuesday, February 28, 2012 10:11 AM
     
     
    Thank you very much.................. can you give me technical explation on this.............
  • Monday, April 30, 2012 1:24 PM
     
     
    this is what has worked for me. 

    M Accioly Self-development

  • Friday, May 18, 2012 3:03 PM
     
     

    If this is in IIS Box try this

    You need to run Access database applications in a 32 bit asp.net application pool.  You do that via your IIS admin.

    Open IIS manager, select Application Pools, select the application pool you are using, click on Advanced Settings in the right-hand menu.  Under General, set "Enable 32-Bit Applications" to "True".


    R A J

    Thanks Thanks Thanks!! That did it for me

  • Thursday, August 02, 2012 4:09 PM
     
     
    that worked for me. the app pool needs to be enabled for 32-bit. thanks a lot.
  • Thursday, August 09, 2012 11:52 AM
     
     
    Hi,
    I'm also facing issue The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
    When i ran my app in 64 bit OS.
    But i need to build the solution in AnyCpu or x64 mode.
    Please any help is really appreciated.

    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you Happy Programming! Hari

  • Monday, August 13, 2012 1:04 PM
     
     

    Hi Hari,hectorm..

    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.

    For your problem you may get solution in one of links

    Check out this links

    http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/45aa44dd-0e6f-42e5-a9d6-9be5c5c8fcd1/

    http://stackoverflow.com/questions/1991643/microsoft-jet-oledb-4-0-provider-is-not-registered-on-the-local-machine

    http://www.wduffy.co.uk/blog/the-microsoft-jet-oledb-4-0-provider-is-not-registered-on-the-local-machine/

    http://blogs.msdn.com/b/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx


    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you Happy Programming!

  • Thursday, August 30, 2012 8:53 AM
     
     
    I had this problem with a web application in windows server 2008 R2. Raj-G solution resolved it. Thank you so much...
  • Tuesday, September 04, 2012 6:02 AM
     
     Proposed
    thank you very much.. that worked for me. Just need to set "Enable 32-Bit Applications" to "True".
    • Proposed As Answer by Vats.Rahul Thursday, September 06, 2012 5:49 PM
    •  
  • Thursday, September 06, 2012 5:21 PM
     
     Proposed

    *********************************************************************************************************

    Problem:I have a webapp which uses the Microsoft.Jet.OLEDB.4.0 driver to import and read an Excel file. The code was working fine till we ran into an issue with our webserver and had to use the aspnet_regiis tool on our web server to fix the issue. Ever since then the same code is giving us the following message whenever we are trying to run it: 

    Application error: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

    Any insight as to what might be causing the problem.

    The same code on my local machine runs fine but on our production server doesn't run even though the latest Microsoft.Jet.OLEDB.4.0 driver is installed and configured properly on it.

    *********************************************************************************************************

    Solution: The Fix in my case was to "Enable 32-bit Applications" to "True", even though I had the 64 bit Driver version installed.

    *********************************************************************************************************

    • Proposed As Answer by Vats.Rahul Thursday, September 06, 2012 5:49 PM
    • Edited by Vats.Rahul Thursday, September 06, 2012 5:53 PM Updating with solution
    •  
  • Wednesday, October 10, 2012 5:03 AM
     
     

    I followed your instruction but i found this error: 

    "Error 8 File 'example.exe' of project output 'Primary output from example (Debug x86)' targeting 'AMD64' is not compatible with the project's target platform 'x86' D:\aaa\example\example Setup\example Setup.vdproj"  how can solve this error?

  • Wednesday, November 14, 2012 3:31 AM
     
     
    Thanks, Magon!!  That worked perfect!!!

    Ryan Shuell

  • Wednesday, December 26, 2012 5:57 PM
     
     

    I Change the "Solution Configuration" from the toolbar from Debug To Release and it worked perfect!!!!!!!

  • Thursday, February 21, 2013 8:07 PM
     
     

    On Windows 8 64-bit, I changed the provider from "Microsoft.Jet.OLEDB.4.0" to "Microsoft.ACE.OLEDB.12.0" and it worked for me. However, I haven't yet tested the same on my 32-bit Vista, fingers crossed!

  • Thursday, March 21, 2013 6:27 AM
     
     Proposed

    thanks very useful post

    Sandeep Kumar