sqlite数据库时不进的出现Unable to open the database file错误
<configuration>
<appSettings>
<add key="ConnectionSQLite" value="App_Data/cean.db3"/>
====================
public SQLiteHelper()
{
}
//数据库连接字符串(web.config来配置),可以动态更改SQLString支持多数据库.
public static string connectionString = "Data Source=" + System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["ConnectionSQLite"]);
===============
public static int ExecuteSql(string SQLString)
{
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
using (SQLiteCommand cmd = new SQLiteCommand(SQLString, connection))
{
=========================
SQLiteHelper.cs中对数据库操作的代码都有加using来自动关闭,可网站还是时不时的出现这错误,也不知道是在什么情况下出现的。出现错误后重新上传web.config或app_code下的cs文件,就可以了。
很苦恼,这有可能是在什么情况下出现的错误的,网站访问量很小。