SqlConnection SC = new SqlConnection( "Place your connection string here" ); string sqltxt = "" ; string ipath = "C:\Backup.Bak" ; sqltxt = @"BACKUP DATABASE SampleDB TO DISK = ' " + ipath + "' WITH INIT " ; SqlCommand sqlCm = new SqlCommand(sqltxt, SC); SC.Open(); sqlCm.ExecuteNonQuery(); SC.Close();
MELICK RAJEE BARANASOORIYA | Enterprise Architect