Posted on: 5/2/2011 12:28:54 PM | Views : 225

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 ...