gridview删除问题
protected void gvQz_RowDeleting(object sender, GridViewDeleteEventArgs e){
string strID = this.gvQz.DataKeys[e.RowIndex].Value[0].ToString();
string strsql = ConfigurationManager.ConnectionStrings["qzsql"].ConnectionString;
SqlConnection con = new SqlConnection(strsql);
con.Open();
string deletestr = "delete from qztable where qzID="+strID;
SqlCommand cmd = new SqlCommand(deletestr,con);
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();
con.Dispose();
}
他总是提示我说红色标记的这句话有错误,怎么回事??
[此贴子已经被作者于2007-5-15 7:11:10编辑过]