R
Raphaël Désalbres
Hello,
I'm having the following problem.
I have SQL Server Accounting database called 'db_Accounting' , and a form.
This database is only accessed by one user at a time.
I have made a menu to backup the database. Works fine.
Dim fd As New SaveFileDialog
fd.Filter = "Database backup (BAK) | *.bak"
If fd.ShowDialog = DialogResult.OK Then
cmd.CommandText = "BACKUP DATABASE AccountingProgram TO DISK='" &
fd.FileName & "'"
cmd.ExecuteNonQuery()
End If
But then I need another menu to restore the database, but it doesn't work,
since the database is already in use.
Even if I try to close the connection it doesn't work.
What can I do about it? Do I have to kill an existing process?
Thanks,
Raphaël Désalbres
I'm having the following problem.
I have SQL Server Accounting database called 'db_Accounting' , and a form.
This database is only accessed by one user at a time.
I have made a menu to backup the database. Works fine.
Dim fd As New SaveFileDialog
fd.Filter = "Database backup (BAK) | *.bak"
If fd.ShowDialog = DialogResult.OK Then
cmd.CommandText = "BACKUP DATABASE AccountingProgram TO DISK='" &
fd.FileName & "'"
cmd.ExecuteNonQuery()
End If
But then I need another menu to restore the database, but it doesn't work,
since the database is already in use.
Even if I try to close the connection it doesn't work.
What can I do about it? Do I have to kill an existing process?
Thanks,
Raphaël Désalbres