当前位置: 代码迷 >> J2EE >> 莫名其妙的错误,请大家指点一下
  详细解决方案

莫名其妙的错误,请大家指点一下

热度:86   发布时间:2016-04-17 23:15:23.0
莫名其妙的异常,请大家指点一下
如图用下面那个已被注释的rs可正常运作,用上面现在这个就会抛这个异常
我就是把原来再一张表中查数据改为在两张表中查,两张表结构完全相同,且都有主键

代码如下

异常如下

Result Set not updatable (references more than one table).This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, can not use functions and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details.
------解决思路----------------------
哦,联合查询是无法执行修改操作的。。。你必须新建一个statement进行update