none
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. This occur after migrating 365 office. RRS feed

  • Question

  • I am developing C# Windows application. Recently i have installed Office 365.

    After installing i am getting below error while executing the EXE.

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

    If i changed x86 then it will work. some of my end user still working Office 2010 and some Office 365.

    x86 will work for some user and x64 will work for some user.

    It is very difficult to identify to maintain two different build and also some user still getting the error.

    Note : i am using Provider=Microsoft.ACE.OLEDB.12.0;

    How to handle this issue..?
    Tuesday, November 26, 2019 10:42 AM

Answers

  • Have you looked into batch builds?


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Gani tpt Tuesday, December 3, 2019 1:18 AM
    Tuesday, November 26, 2019 1:21 PM
    Moderator
  • Jet 4 is 32 bit only. If you really want to stick to 64 bit, you can launch a 32 bit process from your 64 bit process for data access.


    Visual C++ MVP

    • Marked as answer by Gani tpt Tuesday, December 3, 2019 1:18 AM
    Wednesday, November 27, 2019 11:44 AM

All replies

  • What is MDAC?

    https://en.wikipedia.org/wiki/Microsoft_Data_Access_Components

    https://docs.oracle.com/cd/E12096_01/books/AnyInConfig/AnyInConfigPrep12.html

    There are various versions of MDAC so you'll have to find out the version you need and install it on the machine.


    • Edited by DA924x Tuesday, November 26, 2019 10:55 AM
    Tuesday, November 26, 2019 10:54 AM
  • How do we find MDAC and which version in my machine...?
    Tuesday, November 26, 2019 11:03 AM
  • I gave you a link on how to find MDAC to download it and install it.

    • Edited by DA924x Tuesday, November 26, 2019 1:11 PM
    Tuesday, November 26, 2019 1:10 PM
  • Have you looked into batch builds?


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Gani tpt Tuesday, December 3, 2019 1:18 AM
    Tuesday, November 26, 2019 1:21 PM
    Moderator
  • Jet 4 is part of WDAC and WDAC is part of Windows since Vista (for XP you can download MDAC). But it only comes with a 32 bit version. If you try to use Jet 4 in 64 bit code you will get this error. The walkaround is to change your project's target to x86 instead of AnyCPU or x64. 

    Microsoft ACE does support 64 bit but it is part of Office, and the 64 bit installer would block the install if a 32 bit version Microsoft ACE or any other 32 bit Office component is already installed. You will have to ship two versions of your app if you use Microsoft ACE, one targets x86 and ships with the 32 bit version of Microsoft ACE, and another targets x64 and ships with the 64 bit version of Microsoft ACE. Instruct the user to choose the version based on the bitness of existing or planned Office install. 



    Visual C++ MVP


    Tuesday, November 26, 2019 6:41 PM
  • For connecting the DB, shall i use "Microsoft.Jet.OLEDB.4.0" for both 32/64 bit version....
    Wednesday, November 27, 2019 10:19 AM
  • Jet 4 is 32 bit only. If you really want to stick to 64 bit, you can launch a 32 bit process from your 64 bit process for data access.


    Visual C++ MVP

    • Marked as answer by Gani tpt Tuesday, December 3, 2019 1:18 AM
    Wednesday, November 27, 2019 11:44 AM