SQLITE数据库错误 [英] SQLITE DATABASE ERROR
问题描述
连接sq lite数据库时发生以下错误
< pre>< code>< small< pre></pre></small>//code< pre lang ="msil"> System.Data.SQLite.SQLiteException:File打开的不是数据库文件
文件已加密或不是数据库
在System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn,String strSql,SQLiteStatement上一个,UInt32 timeoutMS,String& strRemain)处
在System.Data.SQLite.SQLiteCommand.BuildNextCommand()
在System.Data.SQLite.SQLiteCommand.GetStatement(Int32索引)上
在System.Data.SQLite.SQLiteDataReader.NextResult()
在System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd,CommandBehavior行为)
在System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior行为)上
在System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
在System.Data.SQLite.SQLiteConnection.Open()
在C:\ Documents and Settings \ user \ Desktop \ DBSQlite \ Sqlite.cs:line 19中的Sqlite.Sqlite.MakeConnection(字符串连接)中
在C:\ Documents and Settings \ user \ Desktop \ DBSQlite \ DBSQlite.cs:line 20中的DBSQlite.DBSQlite.Fetch_TabData(String qry,String Connection)中
在e:\ WorkingProjects \ dotaprotocol \ App_Code \ Service.cs:line 36中的Service.TotalPeacks()处,
>
</pre>
那是由于sqllite数据库的版本更改
The following error occurred while connecting the sq lite database
<pre><code><small><pre></pre></small></code><pre lang="msil">System.Data.SQLite.SQLiteException: File opened that is not a database file
file is encrypted or is not a database
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at System.Data.SQLite.SQLiteConnection.Open()
at Sqlite.Sqlite.MakeConnection(String Connection) in C:\Documents and Settings\user\Desktop\DBSQlite\Sqlite.cs:line 19
at DBSQlite.DBSQlite.Fetch_TabData(String qry, String Connection) in C:\Documents and Settings\user\Desktop\DBSQlite\DBSQlite.cs:line 20
at Service.TotalPeacks() in e:\WorkingProjects\dotaprotocol\App_Code\Service.cs:line 36</pre>
</pre>
That''s because of version change of your sqllite db
这篇关于SQLITE数据库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!