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

  • 2010年2月4日 22:50
     
     
    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?

全部回复

  • 2010年2月5日 8:39
     
     已答复
    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

  • 2010年2月10日 5:55
    版主
     
     已答复
    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
  • 2011年3月13日 17:59
     
     
    Thank you so much........
  • 2011年8月26日 5:39
     
     

    I 2 got the same issues.

    Thanks magon.

    Its working fine for me.

  • 2011年11月16日 14:03
     
     

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

  • 2011年11月17日 11:26
     
     

    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
  • 2011年12月14日 16:40
     
     建议的答复

    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
    • 已建议为答案 MarcoVico 2012年4月30日 13:24
    •  
  • 2011年12月24日 17:17
     
     

    thank u 

     

  • 2012年2月28日 10:11
     
     
    Thank you very much.................. can you give me technical explation on this.............
  • 2012年4月30日 13:24
     
     
    this is what has worked for me. 

    M Accioly Self-development

  • 2012年5月18日 15:03
     
     

    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

  • 2012年8月2日 16:09
     
     
    that worked for me. the app pool needs to be enabled for 32-bit. thanks a lot.
  • 2012年8月9日 11:52
     
     
    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

  • 2012年8月13日 13:04
     
     

    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!

  • 2012年8月30日 8:53
     
     
    I had this problem with a web application in windows server 2008 R2. Raj-G solution resolved it. Thank you so much...
  • 2012年9月4日 6:02
     
     建议的答复
    thank you very much.. that worked for me. Just need to set "Enable 32-Bit Applications" to "True".
    • 已建议为答案 Vats.Rahul 2012年9月6日 17:49
    •  
  • 2012年9月6日 17:21
     
     建议的答复

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

    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.

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

    • 已建议为答案 Vats.Rahul 2012年9月6日 17:49
    • 已编辑 Vats.Rahul 2012年9月6日 17:53 Updating with solution
    •  
  • 2012年10月10日 5:03
     
     

    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?

  • 2012年11月14日 3:31
     
     
    Thanks, Magon!!  That worked perfect!!!

    Ryan Shuell

  • 2012年12月26日 17:57
     
     

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

  • 2013年2月21日 20:07
     
     

    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!

  • 2013年3月21日 6:27
     
     建议的答复

    thanks very useful post

    Sandeep Kumar