在线高分求助:关于修改数据源的问题
我在Button2_Click函数写了如下代码
private void Button2_Click(object sender, System.EventArgs e)
{
SqlConnection myconnection=new SqlConnection("server=10.0.60.231;uid=sa;pwd=;database=毕业设计");
myconnection.Open();
SqlDataAdapter mycommand=new SqlDataAdapter("select * from teacher_file ",myconnection);
ds=new DataSet();
mycommand.Fill(ds,"teacher_file");
mycommand.DeleteCommand=new SqlCommand("delete from teacher_file where title='网络数据库' ",myconnection);
mycommand.DeleteCommand.Connection=myconnection;
mycommand.Update(ds,"teacher_file");
myrepeater.DataSource=ds;
myrepeater.DataBind();
}
其中关于myrepeater的前台页面的一个数据绑定控件
问题:为什么myrepeater和数据库中的内容都没有修改