none
Unrecognized database format accdbb RRS feed

  • Question

  • I'm trying to connect c# windows form to Access database and when trying to add a new data source I see an error message saying: "Unrecognized database format..."

    When I open Advanced options in Data Source Configuration Wizard I see tis connection string: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Users\MyPC\Documents\Access Databases\sample_database.accdb"

    I'm using Office 365 (MS Access is a part of this subscription), Visual Studio Community 2015, .Net Framework 4.5 or 4.6.

    Is the problem with Microsoft.ACE.OLEDB version here and which one should be used? I'm not sure if this version is obsolete in my case: Microsoft Access Database Engine 2010 Redistributable

    Or something else is an issue.

    Many thanks!

    Thursday, March 23, 2017 11:08 AM

All replies

  • The Jet OLEDB Provider cannot open a .accdb file. Yes, you do need to use the ACE OLEDB Provider:

    VB:

            Dim accessConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & _
                                                                "Data Source=C:\Users\MyPC\Documents\Access Databases\sample_database.accdb")

    C#

    System.Data.OleDb.OleDbConnection accessConnection = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\MyPC\\Documents\\Access Databases\\sample_database.accdb");

    If the ACE OLEDB Provider is not installed then you will need to download:

    https://www.microsoft.com/en-us/download/details.aspx?id=13255

    Make sure to install the correct version for your app (or Microsoft Office). Microsoft generally recommends using the 32-bit version. The Platform for your Visual Studio project should be set to x86 (32-bit).


    Paul ~~~~ Microsoft MVP (Visual Basic)


    Thursday, March 23, 2017 1:55 PM