比如备份Northwind
SQL:
backup database Northwind to disk='c:\backuptext.dat'
所以程序这样写:
string myExecuteQuery = "backup database Northwind to disk='c:\backuptext.dat'";
SqlCommand myCommand = new SqlCommand(myExecuteQuery, myConnection);
myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
浙公网安备 33010602011771号