OleDb数据库连接web.config的解决方案
web.config中添加
在OleDbHelper.cs中添加 Code public static readonly string DBName = ConfigurationManager.AppSettings.Get("DBName").ToString(); public static readonly string DBDriver = ConfigurationManager.AppSettings.Get("DBDriver").ToString(); public static string ConnString = DBDriver + HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath + "/DataBase/") + DBName;