积极答复者
Windows10 x64,Office2016,C#, Website 未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序

问题
-
Windows10 x64系统,
用vs2016 ,C#做了一个Website,
在website后台链接数据库的时候,产生了异常。
相关代码
string strConnection = "Provider = Microsoft.ACE.OLEDB.12.0;";
strConnection += @"Data Source = D:\\WebSites\\LogIn\\Info.accdb ";
conn = new OleDbConnection(strConnection);conn.Open();
OleDbCommand comm = new OleDbCommand(sql, conn);
comm.ExecuteNonQuery();
conn.Close();黑体字那里产生的异常:未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序。
我要如何把才能把程序调通?
答案
-
黑体字那里产生的异常:未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序。
我要如何把才能把程序调通?
Access数据引擎没有安装,去http://download.microsoft.com/download/7/0/3/703ffbcb-dc0c-4e19-b0da-1463960fdcdb/AccessDatabaseEngine.exe 这里下载安装一下就可以运行了。
另外, 你的是一个网站程序,请确保website有权限访问 "D:\\WebSites\\LogIn\\Info.accdb " 这个路径。 一般我们会用Server.MapPath("")方法动态取得Access在程序里面的物理路径。
希望能够帮到你。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已建议为答案 Herro wongMicrosoft contingent staff, Moderator 2016年4月25日 7:24
- 已标记为答案 CaillenModerator 2016年4月26日 2:55
全部回复
-
黑体字那里产生的异常:未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序。
我要如何把才能把程序调通?
Access数据引擎没有安装,去http://download.microsoft.com/download/7/0/3/703ffbcb-dc0c-4e19-b0da-1463960fdcdb/AccessDatabaseEngine.exe 这里下载安装一下就可以运行了。
另外, 你的是一个网站程序,请确保website有权限访问 "D:\\WebSites\\LogIn\\Info.accdb " 这个路径。 一般我们会用Server.MapPath("")方法动态取得Access在程序里面的物理路径。
希望能够帮到你。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已建议为答案 Herro wongMicrosoft contingent staff, Moderator 2016年4月25日 7:24
- 已标记为答案 CaillenModerator 2016年4月26日 2:55
-
Search in Microsoft download site:
https://www.microsoft.com/zh-cn/search/result.aspx?q=accessdatabaseengine&form=MSHOME
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.