我想通過windows server 2008 R2標準的ado.net連接c#中的ms訪問數據庫。當連接ms訪問數據庫時出現連接錯誤
using System.Data.OleDb; OleDbConnection connectionAccess = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\testTable.mdb"); OleDbDataAdapter adapterAccess = new OleDbDataAdapter("Select * from test", connectionAccess); DataSet ds = new DataSet(); adapterAccess.Fill(ds); dataGridView1.DataSource = ds.Tables[0];
但它給出了一個錯誤:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
你有什麼建議,爲什麼這個錯誤是來了。 如果它沒有註冊,那麼如何註冊這個。
在此先感謝
@dinesh庫馬爾你可以得到64位的ACE引擎免費( http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d&displaylang=en)它向後兼容Jet。這些鏈接也可能有用:http://technet.microsoft.com/en-us/library/ee681792.aspx和http://support.microsoft.com/kb/942976 – Fionnuala 2011-02-02 09:25:03