mysql 数据库 String sql = "select * from activities"; MysqlDaoImpl tdao = new MysqlDaoImpl(); CachedRowSet rs = tdao.queryForResultSet(sql); tdao.conn.setAutoCommit(false); if(rs.next()){ System.out.println(rs.getString(2)); rs.updateString(2, "sddssd"); rs.updateRow(); } rs.acceptChanges(tdao.getConnection()); rs.close(); rs.acceptChanges(tdao.getConnection());