In C# how can I empty an existing SQLite database?
Is it possible via the Connection String? or by the SQLite manager?
I don't want to issue a drop all tables statement.
I have this code, the new
here represents if does not exists create a new one.
try
{
connStr = @"Data Source=" + databaseFilePath + ";New=True;Version=3;";
conn = new SQLiteConnection(connStr);
cmd = new SQLiteCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.Text;
cmd.Connection.Open();
}
catch (Exception e)
{
MessageBox.Show("Caught exception: " + e.Message);
addError("Caught exception: " + e.Message,true);
return false;
}