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

“,” 附近有语法异常

2012-12-21 
“,” 附近有语法错误 在线等fr.linkdata()string strDelete from sensala where 教师编号+ds.Tables[

“,” 附近有语法错误 在线等
  fr.linkdata();
            string str="Delete from sensala where 教师编号='"+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();
都是半角的 跟踪也跟踪了 
[最优解释]
where a='XXX' AND 
AND..... 
[其他解释]
哎 是 是 是 真糗 

热点排行