Chinaunix

标题: 请教:为什么PreparedStatement里update set多个值报找不到符号? [打印本页]

作者: netactspcl    时间: 2009-12-08 23:08
标题: 请教:为什么PreparedStatement里update set多个值报找不到符号?
  1. rs = stmt.executeQuery("select * from article where iscraw=false order by id asc limit 5");
  2.             
  3.             conn.setAutoCommit(false);
  4.             PreparedStatement pstmt = conn.prepareStatement("update article set content=?, iscraw=true where id=?");
  5.                               if(rs.next())
  6.                               {
  7.                     rs.previous();
  8.             }
  9.             else
复制代码


请问这个有语法错误吗? update article set content=?, iscraw=true where id=?
折腾了好久了也没弄明白倒底错哪了

001.PNG (7.95 KB, 下载次数: 37)

001.PNG

作者: netactspcl    时间: 2009-12-08 23:24
谢谢,已经解决,类导入语句被意外地删掉了,现在才发现的.
作者: zhoumiao    时间: 2009-12-09 09:19

作者: starxing    时间: 2009-12-09 10:43

作者: babyblue_993    时间: 2010-03-18 22:38
在eclipse里开发,这问题很容易发现的吧




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2