SQL查询语言更新问题
[code=C#][/code] string[] str = new string[6];
str[0] = this.textBox1.Text.ToString();
str[1] = this.textBox2.Text.ToString();
str[2] = this.textBox6.Text.ToString();
str[3] = this.textBox5.Text.ToString();
str[4] = this.richTextBox1.Text.ToString();
str[5] = this.textBox7.Text.ToString();
long number = Convert.ToInt64(this.textBox4.Text);
System.DateTime dataTime = Convert.ToDateTime(this.textBox3.Text);
string sql = "update caseManager set 案件编号 ='"
+ str[0] + "',案发地点 = '" + str[1] + "',案发时间=" + dataTime
+ ", 案件类型 ='" + str[2] + "',案件情况 ='" + str[4] + "',报案人 ='" + str[3]
+ "',报案人联系方式 = " + number + ",结案与否 ='" + str[5] + "',where 案件编号 ='"+ str[0] + "'";
报的错误时:+[System.Data.SqlClient.SqlException] {"'18' 附近有语法错误。"}System.Data.SqlClient.SqlException
------解决方案--------------------
更新时set中的最后一列后边是没有 , 号的。