出现这个问题首先就找到了insert语句,找到的insert语句
cmd.CommandText = "INSERT INTO Message_FHSQ ([contractid],[applytime],[service],[company],[project],[productname],[sub],[quantity],[unit],[amount],[fhck],[fhwl],[examine],[checkout],[readzt]) VALUES('" + htbh + "''" + sqsj + "','" + gdy + "','" + gsm + "','" + xmmc + "','" + cpmc + "','" + nr + "','" + sl + "','" + dw + "','" + je + "','一线成品仓','装车','未审核','未出库','未读')";
复制到navicat中执行,发现少了个,号
加上,号就好了
正确代码:
cmd.CommandText = "INSERT INTO Message_FHSQ ([contractid],[applytime],[service],[company],[project],[productname],[sub],[quantity],[unit],[amount],[fhck],[fhwl],[examine],[checkout],[readzt]) VALUES('" + htbh + "','" + sqsj + "','" + gdy + "','" + gsm + "','" + xmmc + "','" + cpmc + "','" + nr + "','" + sl + "','" + dw + "','" + je + "','一线成品仓','装车','未审核','未出库','未读')";
标签:语句,INSERT,未审核,VALUES,子句,数目 From: https://www.cnblogs.com/45fdsf4s4sdfsddv/p/17447975.html