Home >Database >Mysql Tutorial >.net连接Access。报找不到关键字provider 急!!!!在线等

.net连接Access。报找不到关键字provider 急!!!!在线等

WBOY
WBOYOriginal
2016-06-07 15:43:481213browse

是的,你连接access的时候,你可以直接把你的数据库放在App_Data的文件夹下面啊,然后在web.config文件中就直接 add key="ConnectionString" value="~/App_Data/Basic.mdb"/,这样就可以连接成功了 OleDbConnection conn = new OleDbConnection("Provider=Mi

是的,你连接access的时候,你可以直接把你的数据库放在App_Data的文件夹下面啊,然后在web.config文件中就直接        ,这样就可以连接成功了

            OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["ConnectionString"].ToString()));

 

这样就完成了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:myeclipse优化2Next article:关于access数据转换的问题