diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs b/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs index b3d259e8c..add791b19 100644 --- a/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs +++ b/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs @@ -100,6 +100,16 @@ namespace Tango.Synchronization.Local return table; } + public void ClearDataBase() + { + foreach (var table in Tables) + { + var dropCommand = _connection.CreateCommand(); + dropCommand.CommandText = String.Format("DELETE FROM {0};", table.TableName); + dropCommand.ExecuteNonQuery(); + } + } + /// <summary> /// Clones a table from another database into this database. /// </summary> |
