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

    Question

  • 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?
    Thursday, February 04, 2010 10:50 PM

Answers

All replies

  • 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

    Friday, February 05, 2010 8:39 AM
  • 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
    Wednesday, February 10, 2010 5:55 AM
    Moderator
  • Thank you so much........
    Sunday, March 13, 2011 5:59 PM
  • I 2 got the same issues.

    Thanks magon.

    Its working fine for me.

    Friday, August 26, 2011 5:39 AM
  • it really worked....thanks for your support.

    Wednesday, November 16, 2011 2:03 PM
  • 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
    Thursday, November 17, 2011 11:26 AM
  • 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
    Wednesday, December 14, 2011 4:40 PM
  • thank u 

     

    Saturday, December 24, 2011 5:17 PM
  • Thank you very much.................. can you give me technical explation on this.............
    Tuesday, February 28, 2012 10:11 AM
  • this is what has worked for me. 

    M Accioly Self-development

    Monday, April 30, 2012 1:24 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

    Friday, May 18, 2012 3:03 PM
  • that worked for me. the app pool needs to be enabled for 32-bit. thanks a lot.
    Thursday, August 02, 2012 4:09 PM
  • 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

    Thursday, August 09, 2012 11:52 AM
  • 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!

    Monday, August 13, 2012 1:04 PM
  • I had this problem with a web application in windows server 2008 R2. Raj-G solution resolved it. Thank you so much...
    Thursday, August 30, 2012 8:53 AM
  • 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
    Tuesday, September 04, 2012 6:02 AM
  • *********************************************************************************************************

    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
    Thursday, September 06, 2012 5:21 PM
  • 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, October 10, 2012 5:03 AM
  • Thanks, Magon!!  That worked perfect!!!

    Ryan Shuell

    Wednesday, November 14, 2012 3:31 AM
  • I Change the "Solution Configuration" from the toolbar from Debug To Release and it worked perfect!!!!!!!

    Wednesday, December 26, 2012 5:57 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, February 21, 2013 8:07 PM
  • thanks very useful post

    Sandeep Kumar


    Thursday, March 21, 2013 6:27 AM
  • So, what do you do what the ONLY option in the Platform drop-down list is "Active (Any CPU)" with no "x86" option?
    Thursday, August 01, 2013 1:15 AM
  • Thanks a ton!! It was great. :)
    Monday, August 05, 2013 10:20 AM
  • I have the same issue (as SirPaladin above me). If you found a solution would you please let me know.



    Tuesday, August 27, 2013 9:50 PM
  • Hi
     
    I am created the windows application on windows 32 framework used by 3.5 
    when i am try to run this application on client machine it gives error 
    'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
     
    the client machine is 64 bit 

    i have completed all steps which are given in the your solution but it not working.

    please help me about this error.

    Monday, September 16, 2013 7:19 AM
  • This worked, thank you! In Visual Studio 2010 the Target CPU option is under Advanced Compiler Options.

    Thanks again!

    Thursday, September 19, 2013 7:34 PM
  • Thanks its working now.
    Tuesday, July 15, 2014 5:42 AM
  • Thanks you, I have spent a week tracking this down. I am using Win8.1 and have the same problem, all fixed now.
    3 hours 28 minutes ago