Result Set not updatable解决办法
2017-01-12 09:35
127 查看
ResultSet更新操作时产生错误。
com.mysql.jdbc.NotUpdatable: Result Set not updatable.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.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.
解决办法:
ps = getConnection().prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
com.mysql.jdbc.NotUpdatable: Result Set not updatable.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.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.
解决办法:
ps = getConnection().prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
相关文章推荐
- com.mysql.jdbc.NotUpdatable: Result Set not updatable (references no primary keys).(解决方法)
- loaded the "BlueView" nib but the view outlet was not set 错误的解决办法。
- silverlight beta2.0安装成功后新建silverlight项目出现object reference not set to an instance of an object的解决办法
- $gopath not set的解决办法
- Android 在onActivityResult()中设置图片setImageResource(resId) 或者改变view属性,不成功的解决办法
- dbstart和dbshut启动、关闭数据库报错ORACLE_HOME_LISTNER is not SET解决办法
- 在java代码中sql语句出现start before result set的错误解决办法
- Strust2 中 Could not find action or result 原因分析及解决办法
- loaded the "BlueView" nib but the view outlet was not set 错误的解决办法。
- 使用mac gradle指令 打包安卓apk遇到$TERM not set问题解决办法
- Struts2中Could not create and/or set value back on to object的解决办法
- nginx upload 模块build错误解决error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]
- Struth2过滤报错“警告: Could not find action or result”解决办法
- SQLServer2005打开表时出现“Object reference not set to an instance of an object. (SQLEditors)”错误的解决办法
- mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource 错误的解决办法
- loaded the "BlueView" nib but the view outlet was not set 错误的解决办法
- loaded the "BlueView" nib but the view outlet was not set 错误的解决办法。
- android ActivityGroup中子Activity的setResult()后的onActivityResult不运行的解决办法
- The specified CGI application misbehaved by not returning a complete set of HTTP headers错误解决办法
- Hadoop2.7启动报Error: JAVA_HOME is not set and could not be found解决办法