读书人

#x27;=#x27; 附近有语法异常

发布时间: 2012-12-16 12:02:32 作者: rapoo

'=' 附近有语法错误。
fr.linkdata();
string str="updata sensala set 教师编号 ='"+ ds.Tables[0].Rows[dataGridView1.CurrentCell.RowIndex][0] + "',应发工资 ='" + ds.Tables[0].Rows[dataGridView1.CurrentCell.RowIndex][1]+ "',实发工资 ='" + ds.Tables[0].Rows[dataGridView1.CurrentCell.RowIndex][2] + "',月份 ='" + ds.Tables[0].Rows[dataGridView1.CurrentCell.RowIndex][3]+ "'";
SqlCommand cmd = new SqlCommand(str, fr.sqlConnection1);
cmd.ExecuteNonQuery();
MessageBox.Show("修改成功", "提示");
fr.sqlConnection1.Close();
各位大神 给看看
[最优解释]
拼接字符串?
试试
format()

[其他解释]
怎麽弄啊 啊
[其他解释]
update 不是updata 哎

读书人网 >C#

热点推荐