有人可以幫我解決這個錯誤嗎?當我嘗試打開一個到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/ –