,在C#项目开发案例全程实录(第2版)中 第9章 进销存系统中出现以下问题
发表在C#图书答疑
2016-10-30
是否精华
是
否
版块置顶:
是
否
通过监视变量 找到了sql的问题 但是又提示 插入错误:列名或所提供值的数目与表定义不匹配 监视后的变量值在sql 已经可以执行 并添加了 在附件中 下面是那段代码
string str_Add = "insert into tb_JhGoodsInfo values( ";
str_Add += "'" + tbGood.strGoodsID + "','" + tbGood.strEmpId + "','" + tbGood.strJhCompName + "',";
str_Add += "'" + tbGood.strDepotName + "','" + tbGood.strGoodsName + "','" + tbGood.strGoodsNum + "',";
str_Add += "'" + tbGood.strGoodsUnit + "'," + tbGood.deGoodsJhPrice + " ," + tbGood.deGoodsSellPrice + " ,";
str_Add += "" + tbGood.deGoodsNeedPrice + "" + tbGood.deGoodsNoPrice + " ,'" + tbGood.strGoodsRemark + "' ,";
str_Add += "'" + tbGood.DaGoodTime + "'," + tbGood.Falg + ")";
string str_Add = "insert into tb_JhGoodsInfo values( ";
str_Add += "'" + tbGood.strGoodsID + "','" + tbGood.strEmpId + "','" + tbGood.strJhCompName + "',";
str_Add += "'" + tbGood.strDepotName + "','" + tbGood.strGoodsName + "','" + tbGood.strGoodsNum + "',";
str_Add += "'" + tbGood.strGoodsUnit + "'," + tbGood.deGoodsJhPrice + " ," + tbGood.deGoodsSellPrice + " ,";
str_Add += "" + tbGood.deGoodsNeedPrice + "" + tbGood.deGoodsNoPrice + " ,'" + tbGood.strGoodsRemark + "' ,";
str_Add += "'" + tbGood.DaGoodTime + "'," + tbGood.Falg + ")";