Exception got

Peter_1985 2,686 Reputation points
2021-04-29T05:07:18.17+00:00

Hi,
I've set up Access on server. Why is it still having issue below?

[InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.]

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,011 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,737 questions
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
881 questions
{count} votes

7 answers

Sort by: Most helpful
  1. AddWebSolution 171 Reputation points
    2021-04-29T07:02:04.897+00:00

    This usually means your system does not have the one or more of the data connectivity library
    You may need to choose the correct the setup version (32 bit or 64 bit) based on the bitness of your Microsoft Outlook.

    Check this toothe-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine

    0 comments No comments

  2. Duane Arnold 3,211 Reputation points
    2021-04-29T07:03:38.023+00:00
    0 comments No comments

  3. Peter_1985 2,686 Reputation points
    2021-04-30T07:01:44.91+00:00

    Hi all,
    Jack,
    I ran the project on the server and got the error.

    Duane,
    After having installed that, I still had the issue when running deployed project.


  4. Peter_1985 2,686 Reputation points
    2021-04-30T07:40:49.493+00:00

    Hi,
    FYI

            OleDbConnection conn2;    
            conn2 = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Jet OLEDB:Database Password=????;Data Source=C:\inetpub\VS2015\House_DB.accdb");    
            OleDbCommand cmd6 = null;    
            OleDbCommand cmd = null;    
            OleDbDataReader reader = null;    
    
            conn2.Open();    
            try    
            {    
                cmd6 = new OleDbCommand("SELECT pict_desc,file_nm FROM house_pict where house_id=[@](/users/na/?userId=02bb7e8c-7ffe-0003-0000-000000000000)_id and ord_key=[@](/users/na/?userId=a549174b-f4bc-4c2e-8aa7-47b918f260d4)", conn2);    
    
    0 comments No comments

  5. Jack J Jun 24,516 Reputation points Microsoft Vendor
    2021-04-30T08:10:31.89+00:00

    @Peter_1985 ,

    Based on my test, your code works well in my computer.

    Please try the following steps to check if it works for you.

    First, Please check if you installed the Microsoft Access Database Engine 2010 Redistributable. If not, please download
    AccessDatabaseEngine.exe from Microsoft Access Database Engine 2010 Redistributable.(Note: Choose the AccessDatabaseEngine_X64.exe if your computer is 64 bit otherwise choose the
    AccessDatabaseEngine.exe)

    Second, Please change platform from Anycpu to x64.

    92790-image.png

    Please try the above suggestions, you can contact me for free time if you still have the problem.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.