我想删去图中的某栏内容而已,可是的我语句却删了一个版面的内容,不知道怎么办是好!?如下是我的语句: private void 删除记录_Click(object sender, EventArgs e)
{
string constr = ";Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=学生管理系统;Data Source=OEM-20120322CRE";
SqlConnection n = new SqlConnection(constr);
n.Open();
string cmdstr = "delete from 学籍信息表 where 学号='" + namestr + "'";
SqlCommand m = new SqlCommand(cmdstr, n);
m.ExecuteNonQuery();
}
{
string constr = ";Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=学生管理系统;Data Source=OEM-20120322CRE";
SqlConnection n = new SqlConnection(constr);
n.Open();
string cmdstr = "delete from 学籍信息表 where 学号='" + namestr + "'";
SqlCommand m = new SqlCommand(cmdstr, n);
m.ExecuteNonQuery();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货