Hi to all,when I want backup or restore my database I have this error:
An attemp to attach an auto-named database for file ..\database.mdf faild.A database with the same name exists,or specified file cannot be opened,or it is located on UNC share.
This is my backup method:
public static void BackupDataBase(string FileName/*Path File*/, string DatabaseName, string ConnectionString)
{
try
{
string Command = @"BACKUP DATABASE " + DatabaseName + " TO DISK = '" + FileName + "'";
SqlCommand cmd = null;
...
Go to the complete details ...