SQLite 连接关闭
由于项目升级, System.Data.SQLite 升级最新版本,关闭数据库连接时发现连接关闭失败,尝试发现需关闭DBCommand.Connection的连接;
public void CloseDB()
{
if (dbo.IsConnect)
{
dbo.Close();
dbo.DBCommand.Connection.Close();
dbo.DBCommand.Connection.Dispose();
dbo.DBCommand.Dispose();
//dbo.DBConnect.Close();
//dbo.DBConnect.Dispose();
//GC.Collect();
//GC.WaitForPendingFinalizers();
//System.Data.SQLite.SQLiteConnection.ClearAllPools();
}
}