1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
saviour-backup-system/Saviour Backup System/databaseTools.cs

32 lines
778 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlServerCe;
using System.IO;
using System.Windows.Forms;
namespace Saviour_Backup_System
{
class databaseTools
{
private static SqlCeConnection conn = new SqlCeConnection("Data Source = " + databaseName);
public static string databaseName = "db.sdf";
private static void executeSQL(string sqlCode)
{
conn.Open();
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = sqlCode;
cmd.ExecuteNonQuery();
}
internal static void clearBackups(string tableName)
{
executeSQL("DELETE FROM Rules;");
}
}
}