SQLITE数据库错误

编程入门 行业动态 更新时间:2024-10-15 00:26:52
本文介绍了SQLITE数据库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

连接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&amp; 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数据库错误

本文发布于:2023-07-15 13:00:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1111375.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   数据库   SQLITE

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!