Commit 9a62e0ce authored by 潘栩锋's avatar 潘栩锋 🚴

SQLiteHelper

1. 添加 IsTableValid 添加出错提示,指示哪个表没有了
2. 修改 InitNoBuild() 数据库文件没有了,也不会 创建新的数据库
parent 4b23182f
...@@ -203,7 +203,6 @@ namespace SQLite ...@@ -203,7 +203,6 @@ namespace SQLite
{ {
if (!System.IO.File.Exists(DBPath)) if (!System.IO.File.Exists(DBPath))
{ {
Build();
return false; return false;
} }
//TODO, 表不对删除就好。。。没必要重新创建数据库 //TODO, 表不对删除就好。。。没必要重新创建数据库
......
...@@ -617,6 +617,7 @@ namespace SQLite ...@@ -617,6 +617,7 @@ namespace SQLite
if (sqls.Count() == 0) if (sqls.Count() == 0)
{ {
//不存在该表,创建 //不存在该表,创建
ErrorMsg = $"sqlite_master 不能找到 name = '{tablename}' 的 sql";
isVaild = false; isVaild = false;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment