JDBC ResultSet Methods Flashcards
Sets the cursor just before the first row in the ResultSet
void beforeFirst()
Sets the cursor just after the last row in the ResultSet
void afterLast()
Sets the cursor to the requested row number absolutely.
boolean absolute(int rowNumber)
Sets the cursor to the requested row relatively.
boolean relative(int rowNumber)
Sets the cursor to the next row of the ResultSet
boolean next()
Sets the cursor to the previous row of the ResultSet
boolean previous()
Methods that return value from a column number.
XXX getXXX(int columNumber) where XXX is an object like a String or Double.
Methods that return a value from a column name.
XXX getXXX(String columnName) where XXX is an object like a String or Double.
Methods that update a value to a column number.
void updateXXX(int columnNumber, XXX x) where XXX is an object like a String or Double.
Methods that update a value to a column name.
void updateXXX(String columnName, XXX x) where XXX is an object like a String or Double.
Executes a query on a statement object to store in a result set.
executeQuery()
The column index in a result set starts at…
1
Modifier of result set that only allows the cursor to move forward.
TYPE_FORWARD_ONLY
Modifier of result set that lets the cursor move forward, backward, or to any location in the resultset. Changes to the underlying database are not updated to the open resultset.
TYPE_SCROLL_INSENSITIEVE
Modifier of result set that lets the cursor move forward, backward, or to any location in the resultset. Changes to the underlying database are updated to the open resultset. This is not supported by most databases as it is very difficult to implement.
TYPE_SCROLL_SENSITIVE