changed SQL values to make them more efficient.
This commit is contained in:
parent
a1460d1deb
commit
01e88de6dd
1 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ namespace Saviour_Backup_System
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createBackupRecord(DriveInfo drive, Int64 startDate, Int64 duration)
|
public static void createBackupRecord(DriveInfo drive, Int64 startDate, Int64 duration, string hash)
|
||||||
{
|
{
|
||||||
string id = USBTools.calculateDriveID(drive);
|
string id = USBTools.calculateDriveID(drive);
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
@ -98,8 +98,8 @@ namespace Saviour_Backup_System
|
||||||
cmd.Parameters["Drive ID"].Value = id;
|
cmd.Parameters["Drive ID"].Value = id;
|
||||||
cmd.Parameters["Start Date"].Value = startDate;
|
cmd.Parameters["Start Date"].Value = startDate;
|
||||||
cmd.Parameters["Backup Name"].Value = getBackupName(drive);
|
cmd.Parameters["Backup Name"].Value = getBackupName(drive);
|
||||||
cmd.Parameters["Hash"].Value = tools.hashDirectory(drive.Name);
|
cmd.Parameters["Hash"].Value = hash;
|
||||||
cmd.Parameters["Duration"].Value = duration;
|
cmd.Parameters["Duration"].Value = (int)duration;
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
conn.Close();
|
conn.Close();
|
||||||
|
|
Reference in a new issue