Muchos hemos utilizado ResulSet en nuestas aplicaciones en java, en la mayoria no usamos mas que rs.next, pero como toda clase el ResultSet tiene mas elementos, que el next.
Primero encontramos el Field Summary:
Field Summary
static int CLOSE_CURSORS_AT_COMMIT
The constant indicating that ResultSet objects should be closed when the method Connection.commit is called.
static int CONCUR_READ_ONLY
The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.
static int CONCUR_UPDATABLE
The constant indicating the concurrency mode for a ResultSet object that may be updated.
static int FETCH_FORWARD
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.
static int FETCH_REVERSE
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.
static int FETCH_UNKNOWN
The constant indicating that the order in which rows in a result set will be processed is unknown.
static int HOLD_CURSORS_OVER_COMMIT
The constant indicating that ResultSet objects should not be closed when the method Connection.commit is called.
static int TYPE_FORWARD_ONLY
The constant indicating the type for a ResultSet object whose cursor may move only forward.
static int TYPE_SCROLL_INSENSITIVE
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.
static int TYPE_SCROLL_SENSITIVE
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others.
Al observar las palabras claves en azul, se puede ver que estos field utilizads adecuadamente nos ayudarian mucho a tener un mejor control de nuestra aplicacion.
Para ver todos los metodos y como funcionan pueden entrar a http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html , seria dificil encontrar mejor ayuda que la que esta ahi, debido a que es fuente oficial de SUN.
Recent Comments