I am trying to use an existing access db file with my c# app. When I try to connect, it says that:
"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."

How do I register it/install it/whatever it is I need to do to make it work?


I have Visual Studio 2008 with SQL Server 2005 Express installed if that helps.

You realize that the connection string format is not the issue right? I know how to format the string, it just can't find the provider.


Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Or in the case of one system I work on:

Data Source=HQNVSQL07;Initial Catalog=dxBugsDb;User Id=******;Password=******;

This is of course using System.Data.SqlClient.SqlConnection objects.


using ( System.Data.SqlClient.SqlConnection = new System.Data.SqlClient.SqlConnection(@"Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;") ) {

As you can see, if it's SQL Server then you don't need a Provider.