本文介绍了语法错误更新语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞!OleDbCommand cmd = default(OleDbCommand);OleDbDataReader reader = default(OleDbDataReader);string cmdUpdate = null;GridViewRow row = (GridViewRow)ResultGridView.Rows[e.RowIndex];Label lbl = (Label)row.FindControl("lblid");TextBox textname = (TextBox)row.FindControl("textbox1");TextBox textmarks = (TextBox)row.FindControl("textbox2");conn.Open();cmdUpdate = "UPDATE db1 " + "SET Names = '" + textname.Text + "'Number = '" + textmarks.Text + "' " + "WHERE ID = " + lbl.Text;cmd = new OleDbCommand(cmdUpdate);try { cmd.Connection = conn; cmd.CommandType = CommandType.Text; reader = cmd.ExecuteReader();} catch (Exception ex) { Response.Write(ex.ToString());}reader.Dispose();conn.Close();bind()推荐答案 这篇关于语法错误更新语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-26 08:59