java - Implement next and previous from database to form -
i have problem in implementing case. 1) examples show can use in following: try{ bd.conectarbasededatos(); preparedstatement stmt; string sql=("select * cab_pedido a, det_pedido b a.numero = b.numero , a.cod_agencia = b.cod_agencia"); system.out.println(sql); stmt = bd.conexion.preparestatement(sql,resultset.type_scroll_insensitive,resultset.concur_read_only); bd.result = stmt.executequery(sql); } catch (instantiationexception | illegalaccessexception | sqlexception e){ system.out.println(e);} return rs; } this returns resultset , can use rs.next(). rs.previous(), etc solve problem, see comments should close rs , db connection. how dangerous that? can implement without closing resultset , connection? because when close resultset, not able data anymore. 2) store data hashmap or list possibility if want last or first values how can that? i ...