Exception got

Peter_1985 2,546 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.
10,400 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,608 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.
834 questions
{count} votes

7 answers

Sort by: Newest
  1. Peter_1985 2,546 Reputation points
    2021-05-03T02:50:32.337+00:00

    Hi,
    I cannot access your doc. Which setup should be uninstalled?


  2. Peter_1985 2,546 Reputation points
    2021-04-30T10:00:46.743+00:00

    Hi,
    I did uninstall 32-bit version (of this) already. Can you help to issue below?
    92870-1b.png


  3. Jack J Jun 24,311 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.


  4. Peter_1985 2,546 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. Peter_1985 2,546 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.