0
votes

I've been creating an application using Visual Studio 2010 C# and Microsoft Access 2007. I am new to this and I am experiencing some errors. I've tried using MySQL as a database before but when I changed it to MS Access 2007, there are errors occured stating that the database format is not recognized.

Here's the print screen: enter image description here

The file type of the database I created is .accdb. Please help. Thanks

2
Why are you only pretty sure the file exists? I'd suggest using Windows Explorer to ensure it exists.Nathanial Woolls
Sorry to point to the obvious, but does C:\gxi.accdb exist in Windows Explorer?Jim Deville
@NathanialWoolls: Thanks for the help. Got new errors though. I just edited my question. Thankssean

2 Answers

3
votes

The driver you are using to connect accdb database is outdated, install Access 2010 Driver and then change your connection string in this way :

string MyConString = Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\pathofyourDatabase.accdb
0
votes

Either the database is encrypted or you don't have the proper Access engine for the architecture (x86/x64). Visual Studio is also 32-bit and probably can't connect to x64 database. See this post.