Unty 使用SQLITE 运行时出现“database is not open”

错误信息如下:
InvalidOperationException: Database is not open
Mono.Data.Sqlite.SqliteCommand.InitializeForReader ()
Mono.Data.Sqlite.SqliteCommand.ExecuteReader (CommandBehavior behavior)
Mono.Data.Sqlite.SqliteCommand.ExecuteReader ()
(wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteCommand:ExecuteReader ()
SQLiteHelper.ExecuteQuery (System.String queryString) (at Assets/Script/SQLiteHelper.cs:51)
SQLiteHelper.CreateTable (System.String tableName, System.String[] colNames, System.String[] colTypes) (at Assets/Script/SQLiteHelper.cs:205)
SQLiteDemo.Start () (at Assets/Script/SQLiteDemo.cs:20)

看下你的sqlite数据库文件是否存在,在指定的目录下。并且可以读取

SQLiteConnection对象有没有Open?

我跟你遇到了同样的问题,请问你解决了吗?

这个问题解决了 一晚上。。。。 解决方法是在官网下载64位的SQLITE3.DLL 放到C:\Windows\SysWOW64下

我来说说我是怎么解决的,需要将SQLITE3.DLL放在C:\Windows\System32 和C:\Windows\SysWOW64,两个文件夹下都放一个,应该不会再有问题了

SQLITE3.DLL直接放到unity工程plugins文件夹下也会没问题。对应unity安装路径下Mono.Data.Sqlite.dll也放进去。
\Editor\Data\MonoBleedingEdge\lib\mono\gac\Mono.Data.Sqlite*\Mono.Data.Sqlite.dll