I get the following error:
The 'Miccrosoft.Jet.OLEDB.4.0' provider is not registered on the local machine
When I run this code:
string dbConn = @"Provider=Miccrosoft.Jet.OLEDB.4.0;Data Source=C:\structuredfunds.mdb";
string cmdText = "select * from StructuredFundPosition";
DataTable dt = new DataTable();
using (OleDbDataAdapter da = new OleDbDataAdapter(cmdText, dbConn))
{
da.Fill(dt);
}
using statements are:
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data.Odbc;
I'm running on Windows XP SP2, Visual Studio 2008. If I download the MDAC installer and attempt to install I get:
MDAC 2.8 RTM is incompatible with this version of Windows. All of its features are currently part of Window.
Do I need to add any references to my Visual Studio project? I've just System.Data at the moment.
Also is OleDb the best way to communicate with Microsoft Access?
Thanks