Answer the question
In order to leave comments, you need to log in
Why can't I delete a database in c# after working with it?
using (SQLiteConnection db = new SQLiteConnection("Data Source=" + @"C:\db" + ";Version=3;"))
{
db.Open();
SQLiteCommand cmd = db.CreateCommand();
cmd.CommandText = "SELECT * FROM moz_cookies";
using (var reader = cmd.ExecuteReader()) while (reader.Read()) if (Convert.ToString(reader["baseDomain"]) == dm)
{
lst.Add(Convert.ToString(reader["name"]));
lst.Add(Convert.ToString(reader["value"]));
};
db.Close();
}
File.Delete(@"C:\db");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question