![]() |
#2
lyf40898352014-08-20 21:05
回复 2 楼 yh2014wy
|

FeifeiDataSet fds = new FeifeiDataSet();
FeifeiDataSetTableAdapters.studentTableAdapter stuTblapt = new FeifeiDataSetTableAdapters.studentTableAdapter();
stuTblapt.Fill(fds.student);
FeifeiDataSet.studentRow reStuRow = fds.student.FindBystu_id(10010);
fds.student.RemovestudentRow(reStuRow);
stuTblapt.Update(reStuRow);
foreach (FeifeiDataSet.studentRow sr in fds.student.Rows)
{
Console.WriteLine(sr.stu_id + " " + sr.stu_name + " " + sr.stu_address);
}
运行之后,内存中记录删除,但数据库却没删除.....为什么?