求一段代码的含义,是C#+sql Serve的

protected void Button1_Click(object sender, EventArgs e) { SqlConnection con = dataconn.getcon(); con.Open(); //string Querystr = "select * from examstu_info where stu_id=" + "'" + TextBox1.Text.ToString()+ "'"; //SqlCommand myCommand = new SqlCommand(Querystr, con); //SqlDataReader myDataReader = myCommand.ExecuteReader(); //myDataReader.Read(); //string sql = "update examstu_info set exam_status=" + "'" + "b" + "'" + "where stu_id=" + "0000000010"; string sql = "update examstu_info set stu_name=" + "'" + TextBox2.Text + "'" + "where stu_id=" + "'" + TextBox1.Text + "'"; SqlCommand cmd = new SqlCommand(sql, con); cmd.ExecuteNonQuery(); } }

string sql = "update examstu_info set stu_name=" + "'" + TextBox2.Text + "'" + "where stu_id=" + "'" + TextBox1.Text + "'";
关键是这一行,更新examstu_info(考试系统的学生信息表)中的学生姓名字段

看着有点像asp,这是数据库的更新,主要是在于链接符,链接语句