System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database no such table: xxx
错误原因:在连接数据库时,数据库文件没有使用绝对路径:
new SQLiteConnection("Data Source=xxx.sqlite;Version=3;");
解决方法:指定数据库文件绝对路径即可
new SQLiteConnection("Data Source=D:\111\222\333\xxx.sqlite;Version=3;");
错误原因:在连接数据库时,数据库文件没有使用绝对路径:
new SQLiteConnection("Data Source=xxx.sqlite;Version=3;");
解决方法:指定数据库文件绝对路径即可
new SQLiteConnection("Data Source=D:\111\222\333\xxx.sqlite;Version=3;");
本文介绍了在使用System.Data.SQLite访问数据库时遇到的SQL logic error or missing database问题,并给出了具体的解决方案,即通过指定数据库文件的绝对路径来避免此类错误。
1564

被折叠的 条评论
为什么被折叠?



