backup
-
Hi all I have a problem that became huge. I want to make a backup from my database and if i attach my database to microsoft sql 2005 and use this connectionstring i can backup from my database correctly: string connectionstring="Data Source=.;DataBase=mydatabase;Integrated Security=true" but when i detach it from microsoft sql 2005 and add it to SQLEXPRESS and use SQLEXPRESS of visual studio by this connectionstring=@"Data Source=.\SQLEXPRESS;AttachDbFilename=" + Application.StartupPath + "\\Data\\mydatabase.mdf;" + "Integrated Security=True;User Instance=True"; but it didn't work and error delare that "Could not locate entry in sysdatabases for database 'mydatabase'. No entry found with that name. Make sure that the name is entered correctly. BACKUP DATABASE is terminating abnormally." and because of some reason i want to use SQLEXPRESS. what should i do? note:This is my sql command for backup: backup = string.Format(@"backup database mydatabase to disk='{0}'",addr); backup.ExecuteNonQuery();