Minnu Merin Alex

Minnu Merin Alex

  • NA
  • 191
  • 27.6k

RESTORE DATABASE

Jun 6 2016 4:18 AM
i did back up using the following code
public static void backups()
{
string str = "use point_of_sale";
string str1 = "Backup database point_of_sale to disk='E:\\backupfile.bak'WITH FORMAT, MEDIANAME = 'SQLServerBackups', NAME = 'Full Backup of pos'";
SqlCommand cmd1 = new SqlCommand(str, Connection.Getconnection());
SqlCommand cmd2 = new SqlCommand(str1, Connection.Getconnection());
cmd1.ExecuteNonQuery(); cmd2.ExecuteNonQuery();
}
 now i have a restore button .plz tell me the code i should enter 

Answers (4)