Did you know? How to connect to Microsoft Access database from a .NET 4.0 application
Goal:
To write a SQL command that will connect to the Microsoft Access 2010 database in Visual Studio 2010.
Solution:
This can be achieved using the connection string as follows,
OleDbConnection connection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data source=D:\\Database\\myDatabase.accdb; Persist Security Info = False");
I hope this helps.