create folder with name of backup
SqlConnection con = new SqlConnection("Data Source=EASY-857AC062F0\\ SQLEXPRESS;Initial Catalog=CAS;Integrated Security=True");
SqlCommand cmd = new SqlCommand("backup database CAS to disk = '" + Server.MapPath("~/backup/CAS. bak") + "' ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
SqlConnection con = new SqlConnection("Data Source=EASY-857AC062F0\\
SqlCommand cmd = new SqlCommand("backup database CAS to disk = '" + Server.MapPath("~/backup/CAS.
con.Open();
cmd.ExecuteNonQuery();
con.Close();
No comments :
Post a Comment