From 01e88de6dd70e9734692be0175323a5ba7de8650 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 15 Dec 2014 16:12:57 +0000 Subject: [PATCH] changed SQL values to make them more efficient. --- Saviour Backup System/databaseTools.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Saviour Backup System/databaseTools.cs b/Saviour Backup System/databaseTools.cs index ebab644..ebdcdc9 100644 --- a/Saviour Backup System/databaseTools.cs +++ b/Saviour Backup System/databaseTools.cs @@ -84,7 +84,7 @@ namespace Saviour_Backup_System 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); conn.Open(); @@ -98,8 +98,8 @@ namespace Saviour_Backup_System cmd.Parameters["Drive ID"].Value = id; cmd.Parameters["Start Date"].Value = startDate; cmd.Parameters["Backup Name"].Value = getBackupName(drive); - cmd.Parameters["Hash"].Value = tools.hashDirectory(drive.Name); - cmd.Parameters["Duration"].Value = duration; + cmd.Parameters["Hash"].Value = hash; + cmd.Parameters["Duration"].Value = (int)duration; cmd.ExecuteNonQuery(); cmd.Parameters.Clear(); conn.Close();