none
Microsoft.Jet.OLEDB.12.0' provider is not registered on the local machine. RRS feed

  • Question

  • Hi, I am having error on below code. I am getting error: "Microsoft.Jet.OLEDB.12.0' provider is not registered on the local machine."

                       System.Globalization.CultureInfo oldCI = Thread.CurrentThread.CurrentCulture;
                        Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
                    
                        string conn = String.Format("Provider=Microsoft.Jet.OLEDB.12.0; data source={0}; Extended Properties=Excel 12.0;HDR=Yes;IMEX=1;", MyExcelFile);
                        dt_MyExcelFile = new DataTable();
                        string query = String.Format("SELECT * FROM [Sheet1$]");
                        System.Data.OleDb.OleDbConnection MyConn = new System.Data.OleDb.OleDbConnection(conn);
                        System.Data.OleDb.OleDbDataAdapter myCommand = new System.Data.OleDb.OleDbDataAdapter(query, MyConn);
                        //Fill the data table with excel data
                        myCommand.Fill(dt_MyExcelFile);
                        //Close the connection
                        MyConn.Close();

    Can you help me please?

    Kind Regards

    Tuesday, August 15, 2017 12:27 PM

Answers

  • Hello,

    Do you install Microsoft Access Database Engine 2010 Redistributable? Please download from https://www.microsoft.com/en-sg/download/details.aspx?id=13255

    It the issue persists, please change your Solution Platform from "Any CPU" to "x86".

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Chenchen LiModerator Tuesday, August 22, 2017 8:57 AM
    • Marked as answer by GC2006 Tuesday, August 22, 2017 10:11 AM
    Wednesday, August 16, 2017 2:03 AM
    Moderator

All replies

  • Hello,

    Do you install Microsoft Access Database Engine 2010 Redistributable? Please download from https://www.microsoft.com/en-sg/download/details.aspx?id=13255

    It the issue persists, please change your Solution Platform from "Any CPU" to "x86".

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Chenchen LiModerator Tuesday, August 22, 2017 8:57 AM
    • Marked as answer by GC2006 Tuesday, August 22, 2017 10:11 AM
    Wednesday, August 16, 2017 2:03 AM
    Moderator
  • Thank you. It is working now...

    Kind Regards

    Tuesday, August 22, 2017 10:11 AM