日期:2014-05-17  浏览次数:20798 次

'=' 附近有语法错误。
 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 哎