备份那里出问题了
try{
string myConnection = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(myConnection);
con.Open();
string myExecuteQuery = "backup database Database to disk='d:\backuptext.dat'";
SqlCommand myCommand = new SqlCommand(myExecuteQuery,con);
myCommand.ExecuteNonQuery();
con.Close();
Label1.Text = "备份成功";
}
catch { Label1.Text = "备份失败"; }
老是备份失败,帮我看看指明下那里错了……
[ 本帖最后由 wyx814 于 2010-11-22 22:45 编辑 ]