Unrecognized database format'C:\.....\Employees.accdb for Microsoft Access Database File?
Asked Answered
C

2

17

I am trying to access a file stored in a Microsoft Access database. (I am working in Visual Studio 2012) I chose the Database source type, and the Dataset database model, when it asks me "which data connection should your application use to connect to the database?", I clicked New Connection, then I chose Microsoft Access Database File (OLE DB). Under the Database file name, I clicked browse and selected the appropriate file(Employees.accdb). When I press Test Connection or Ok I get this error: Unrecognized database format' C:.....\Employees.accdb. Any ideas as to what I am doing wrong?

Comitative answered 18/4, 2014 at 18:49 Comment(10)
Show your connection string....Isidore
im sorry completely new to database stuff, how do i do that?Comitative
if it helps the file is on my computerComitative
The problem is probably due to an incorrect OleDb driver selected by the wizard that builds your connection string. (The string used to connect to your database)Isidore
Right click your connection in the Server Explorer, choose Modify Connection, Click Advanced, look at the line Provider. You should have Microsoft.ACE.OLEDB.12.0 as provider not Microsoft.Jet.OLEDB.4.0 (the latter cannot recognize database in ACCDB format)Isidore
Ok i finally found it, now how do you get it to change to Microsoft.ACE.OLEDB.12.0? it does not let me modify it. Mabe i need to download it?Comitative
show your code and values!Ellsworthellwood
Yoop, it work for me. Thanks @IsidoreLien
@Isidore Thanks. This looks exactly like my problem. Do you know how I can change to Microsoft.ACE.OLEDB.12.0 instead of Microsoft.Jet.OLEDB.4.0 which is the only one I can choose in Visual Studio.Trin
Not sure about that but if you build a 32 bit application I think you get only the compatible providers. If you have ACE for 64bit there is no point to show it for a 32bit application.Isidore
C
34

Your computer is missing Microsoft.ACE.OLEDB.12.0

You can get it from here: http://www.microsoft.com/en-us/download/details.aspx?id=13255

Comitative answered 19/4, 2014 at 17:58 Comment(0)
C
2

I know this is a bit old but if anyone else has the same problem, this worked for me.

According to your description, I create a sample VB project and try connect to the Access 2016 database and I get the same result with you. Then I try to connect old version of Access database and it is successful.

I find the Provider that used to connect the old version is Microsoft.Jet.OLEDB.4.0. But for Access 2016 database, we should use Microsoft.ACE.OLEDB.12.0. So we need to install Microsoft Access Database Engine 2010 Redistributable and 2007 Office System Driver: Data Connectivity Components, which will help us install and register Microsoft.ACE.OLEDB.12.0 to our local machine.

Then please connect the Access 2016 database with following steps.

Add New Data Source --> database --> Dataset --> New Connection --> Microsoft Access Database File --> select the accdb file -> Click Advanced button to change the Provider. Then click the OK button back to the Add connection windows and Test connection, it will succeed. Screenshot

Councillor answered 13/11, 2018 at 2:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.