首页上一页 1 下一页尾页 2 条记录 1/1页
C#实录 超市进销存 问题2
发表在C#图书答疑
2011-05-19
是否精华
是
否
版块置顶:
是
否
就是没有修改 直接运行的 提示 我错误 说的是 system.data.sqlclient.sqlexception:","附近有语法错误
在tb_jhgoodsinfomenthod.cs 最后说的是在行号35 然后添加失败~!(商品进货管理)
#region 添加
public int tb_JhGoodsInfoMenthodAdd(tb_JhGoodsInfo tbGood)
{
int intFalg = 0;
try
{
//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.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 + ")";
getSqlConnection getConnection = new getSqlConnection();
conn = getConnection.GetCon();
cmd = new SqlCommand(str_Add, conn);
intFalg = cmd.ExecuteNonQuery();
conn.Dispose();
return intFalg;
}
catch (Exception ee)
{
MessageBox.Show(ee.ToString());
return intFalg;
}
}
#endregion
不知道是哪个地方错了
在别的电脑上 也有这个问题,这就是你们所谓的严格编码?我累个去 垃圾书~!
在tb_jhgoodsinfomenthod.cs 最后说的是在行号35 然后添加失败~!(商品进货管理)
#region 添加
public int tb_JhGoodsInfoMenthodAdd(tb_JhGoodsInfo tbGood)
{
int intFalg = 0;
try
{
//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.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 + ")";
getSqlConnection getConnection = new getSqlConnection();
conn = getConnection.GetCon();
cmd = new SqlCommand(str_Add, conn);
intFalg = cmd.ExecuteNonQuery();
conn.Dispose();
return intFalg;
}
catch (Exception ee)
{
MessageBox.Show(ee.ToString());
return intFalg;
}
}
#endregion
不知道是哪个地方错了
在别的电脑上 也有这个问题,这就是你们所谓的严格编码?我累个去 垃圾书~!