winForm +access 資料連線 出錯 未在本機電腦上註冊“Microsoft.Jet.OLEDB.12.0”,microsoft.jet.oledb

來源:互聯網
上載者:User

winForm +access 資料連線 出錯 未在本機電腦上註冊“Microsoft.Jet.OLEDB.12.0”,microsoft.jet.oledb

未在本機電腦上註冊“Microsoft.Jet.OLEDB.12.0”提供者。


1.資料庫連接字串:

2007 資料庫連接字串:

conStr="Provider=Microsoft.Jet.OLEDB.12.0;Data Source=E:\spendingVoucher.accdb;Persist Security Info=False";

2.可是出現了異常:未在本機電腦上註冊“Microsoft.Jet.OLEDB.12.0”提供者。

於是乎下載並安裝了AccessDatabaseEngine.exe 並重新啟動,運行還是報錯

上網查了別人用Microsoft.ACE.OLEDB.12.0,替代Microsoft.Jet.OLEDB.12.0  , 

我試了下,成功了!可是不明白。


於是正確的連接字串為:

conStr="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\spendingVoucher.accdb;Persist Security Info=False";

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.