Fixed a bug that caused the ModifyRecord form to crash on load if the cursor was over the top left hand header cell. Set a timeout for the restore SQL statement to hopefully prevent a timeout exception from being thrown. Minor code clean up.

This commit is contained in:
2018-04-04 01:47:02 -05:00
parent 65dd82cd31
commit f2fe8c592f
10 changed files with 45 additions and 62 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ namespace AdvertsingProfitControl
}
}
if (backup.SingleFileBackup(customBackupLocation))
if (backup.SingleFileBackup(Properties.Settings.Default.ConnectionString, customBackupLocation))
{
//Check the state of the backup.
if (backup.State == 0)
@@ -196,7 +196,7 @@ namespace AdvertsingProfitControl
return;
}
if (restore.SingleFileRestore(restoreLocationTextBox.Text, Properties.Settings.Default.DefaultServer))
if (restore.SingleFileRestore(restoreLocationTextBox.Text, Properties.Settings.Default.ConnectionString))
{
restoreResultLabel.Text = @"Successfully restored the database.";
restoreLocationTextBox.Text = string.Empty;