求大神指教这句程序是哪里有错误,运行的时显示保存不成功
stringupdateSql="updatetb_bookBorrowsetreturnTime='"+returnTime+"'wherebookBarCode='"...
string updateSql = "update tb_bookBorrow set returnTime='" + returnTime + "' where bookBarCode='" + bookBarCode + "'and readerBarCode='" + txtReaderBarCode.Text + "' and isReturn='0' ";
展开
2个回答
2013-05-31
展开全部
把+ 换成 & 试试 ' " 和 " ' 你没弄明白
应该是
string updateSql =' "update tb_bookBorrow set returnTime=' [" & returnTime & "] where bookBarCode=' (" & bookBarCode & ") ' and ' readerBarCode='" & txtReaderBarCode.Text & " ' and isReturn=' "0" ' ";
应该是
string updateSql =' "update tb_bookBorrow set returnTime=' [" & returnTime & "] where bookBarCode=' (" & bookBarCode & ") ' and ' readerBarCode='" & txtReaderBarCode.Text & " ' and isReturn=' "0" ' ";
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询