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 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?
相关问题
- 'System.Threading.ThreadAbortException' in
- how to use special characters like '<'
- C# to VB - How do I convert this anonymous method
- Scaling image for printing
- Importing data from MS Access db to PostgreSQL db
相关文章
- vb.net 关于xps文件操作问题
- Visual Studio Hangs on Loading UI Library
- Checking for DBNull throws a StrongTypingException
- Using the typical get set properties in C#… with p
- “Csc.exe” exited with code -1073741819
- Load a .NET assembly from the application's re
- C# equivalent of VB DLL function declaration (Inte
- What other neat tricks does the SpecialNameAttribu
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.
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