首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

'=' 附近有语法异常

2012-12-16 
'' 附近有语法错误。 fr.linkdata()string strupdata sensala set 教师编号 + ds.Tables[

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

热点排行