C#错误,因为语法错误为','

时间:2013-01-12 09:23:03

标签: sql-server-2008 c#-2.0

以下代码给我一个错误;

dt = sFunctions.ExecuteQuery(Variables.con, "House_Machinery", "usp_housemachinery_Master_insert" + Id + ",'" + txtItemName.Text + "'," + txthp.Text + "," + txtrate.Text + "," + Variables.sTendercode + "," + Variables.StrResourceHeaderCode);
                sFunctions.setSqldbConnCommand_Close(sSqldbCommand);

','

附近的语法不正确

任何人都可以对此有所了解吗?

1 个答案:

答案 0 :(得分:2)

可能是因为存储过程后缺少空间

dt = sFunctions.ExecuteQuery(Variables.con, "House_Machinery", 
  "usp_housemachinery_Master_insert " + Id 

我还建议您考虑以下技术来消除此类问题: