日期:2014-05-20  浏览次数:20776 次

C#嵌套Update语句语法问题
cmd.CommandText = "update 书籍信息表 set LendNum = LendNum+1 ,OnShelfNum = BookSummary - LendNum from where Bookno = '" + textBox10.Text.ToString().Trim() + "'";请大家帮我看看这个语句写得对吗,我查不出错误,但是老报错

------解决方案--------------------
update 书籍信息表
set LendNum = LendNum+1 ,OnShelfNum = BookSummary - LendNum
where Bookno = ' " + textBox10.Text.ToString().Trim() + "
把form去掉!试一试!!!
------解决方案--------------------
楼上说的对,要个FROM干嘛?