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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user