有人可以帮我解决这个错误吗?当我尝试打开一个到mdb的连接时,我得到“'Microsoft.Jet.OLEDB.4.0'提供程序未在本地计算机上注册”错误。我该如何解决这个问题?“Microsoft.Jet.OLEDB.4.0”提供程序未在本地计算机上注册
我的代码非常简单:
class ImportTDB {
private string filename;
private string connectionString;
private int collisions = 0;
public ImportTDB(String filename) {
this.filename = filename;
this.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename;
}
public void loadCustomerList() {
DataTable dt = new DataTable();
using (OleDbConnection conn = new OleDbConnection(connectionString)) {
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Names", conn);
conn.Open();
adapter.Fill(dt);
conn.Close();
}
Console.WriteLine(dt.ToString());
}
}
我已经尝试此下载此驱动程序和它的工作般的魅力。 http://blog.nkadesign.com/2008/windows-2008-the-microsoftjetoledb40-provider-is-not-registered-on-the-local-machine/ –