JDBC ResultSet 可更新的结果集
接着上一篇:可滚动的结果集; 1)com.microsoft.sqlserver.jdbc.SQLServerException: 结果集不可更新。 当concurrency设置为: ResultSet.CONCUR_READ_ONLY(默认)时,结果集不能更新数据,否则会报 SQLServerException 示例: statement = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); rs = statement.executeQuery(); rs.absolute(3);// 结果集可滚动 rs.updateString("strfeaturecode", "hwp_332"); rs.updateRow(); // 更新结果集,报错 SQLServerException System.out.println(rs.getString("virusid")+" "+rs.getString("featurecode")+" "+rs.getString("apppackage")+" "+rs.getInt("virustype")+" "); 2)com.microsoft.sqlserver.jdbc.SQLServerException: