| java.sql.ResultSet |
Known Indirect Subclasses
|
An interface to an Object which represents a Table of Data, typically returned as the result of a Query to a Database.
ResultSets have a Cursor which points to a current row of
data. When a ResultSet is created, the Cursor is positioned before the first
row. To move the Cursor to the next row in the table, use the
next method. The next method returns true until there are no
more rows in the ResultSet, when it returns false.
The default type of ResultSet cannot be updated and its cursor can only move
forward through the rows of data. This means that it is only possible to read
through it once. However, it is possible to create types of ResultSet that
can be updated and also types where the cursor can be scrolled forward and
backward through the rows of data. This is shown in the following code
example:
Connection con;
Statement aStatement = con.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE );
ResultSet theResultSet = theStatement.executeQuery("SELECT price, quantity FROM STOCKTABLE");
// theResultSet will be both scrollable and updateable
The ResultSet interface provides a series of methods for retrieving data from columns in the current row, such as getDate, getFloat. The columns are identified either by their index number (starting at 1) or by their name - there are separate methods for both techniques of column addressing. The column names are case insensitive. If several columns have the same name, then the getter methods use the first matching column. This means that if column names are used, it is not possible to guarantee that the name will retrieve data from the intended column - for certainty it is better to use column indexes. Ideally the columns should be read left-to-right and read once only, since not all * databases are optimized to handle other techniques of reading the data.
When reading data, the JDBC driver maps the SQL data retrieved from the database to the Java type implied by the method invoked by the application. The JDBC specification has a table of allowable mappings from SQL types to Java types.
There are also methods for writing data into the ResultSet, such as updateInt, updateString. The update methods can be used either to modify the data of an existing row or to insert new data rows into the ResultSet. Modification of existing data involves moving the Cursor to the row which needs modification and then using the update methods to modify the data, followed by calling the ResultSet.updateRow method. For insertion of new rows, the cursor is first moved to a special row called the Insert Row, data is added using the update methods, followed by calling the ResultSet.insertRow method.
A ResultSet is closed if the Statement object which generated it closed, executed again or is used to retrieve the next result from a sequence of results.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | CLOSE_CURSORS_AT_COMMIT | A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked. | |||||||||
| int | CONCUR_READ_ONLY | A constant used to indicate the Concurrency Mode for a ResultSet object that cannot be updated. | |||||||||
| int | CONCUR_UPDATABLE | A constant used to indicate the Concurrency Mode for a ResultSet object that can be updated. | |||||||||
| int | FETCH_FORWARD | A constant used to indicate processing of the rows of a ResultSet in the forward direction, first to last | |||||||||
| int | FETCH_REVERSE | A constant used to indicate processing of the rows of a ResultSet in the reverse direction, last to first | |||||||||
| int | FETCH_UNKNOWN | A constant used to indicate that the order of processing of the rows of a ResultSet is unknown. | |||||||||
| int | HOLD_CURSORS_OVER_COMMIT | A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked. | |||||||||
| int | TYPE_FORWARD_ONLY | A constant used to indicate a ResultSet object whose Cursor can only move forward | |||||||||
| int | TYPE_SCROLL_INSENSITIVE | A constant used to indicate a ResultSet object which is Scrollable but which is not sensitive to changes made by others | |||||||||
| int | TYPE_SCROLL_SENSITIVE | A constant used to indicate a ResultSet object which is Scrollable but which is sensitive to changes made by others | |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Moves the Cursor to a specified row number in the ResultSet.
| |||||||||||
Moves the Cursor to the end of the ResultSet, after the last row.
| |||||||||||
Moves the Cursor to the start of the ResultSet, before the first row.
| |||||||||||
Cancels any updates made to the current row in the ResultSet.
| |||||||||||
Clears all the warnings related to this ResultSet.
| |||||||||||
Releases this ResultSet's database and JDBC resources.
| |||||||||||
Deletes the current row from the ResultSet and from the underlying
database.
| |||||||||||
Gets the index number for a column in the ResultSet from the provided
Column Name.
| |||||||||||
Shifts the cursor position to the first row in the ResultSet.
| |||||||||||
Gets the value of a column specified as a column name as a
java.sql.Array.
| |||||||||||
Gets the content of a column specified as a column index in the current
row of this ResultSet as a java.sql.Array.
| |||||||||||
Gets the value of a column specified as a column name as an ASCII
character stream.
| |||||||||||
Gets the value of a column specified as a column index as an ASCII
character stream.
| |||||||||||
This method is deprecated.
Gets the value of a column specified as a column name, as a
java.math.BigDecimal.
| |||||||||||
This method is deprecated.
Gets the value of a column specified as a column index as a
java.math.BigDecimal.
| |||||||||||
Gets the value of a column specified as a column index as a
java.math.BigDecimal.
| |||||||||||
Gets the value of a column specified as a column name, as a
java.math.BigDecimal.
| |||||||||||
Gets the value of a column specified as a column index as a binary
stream.
| |||||||||||
Gets the value of a column specified as a column name as a binary stream.
| |||||||||||
Gets the value of a column specified as a column index as a java.sql.Blob
object.
| |||||||||||
Gets the value of a column specified as a column name, as a java.sql.Blob
object.
| |||||||||||
Gets the value of a column specified as a column index as a boolean.
| |||||||||||
Gets the value of a column specified as a column name, as a boolean.
| |||||||||||
Gets the value of a column specified as a column index as a byte.
| |||||||||||
Gets the value of a column specified as a column name as a byte.
| |||||||||||
Gets the value of a column specified as a column index as a byte array.
| |||||||||||
Gets the value of a column specified as a column name as a byte array.
| |||||||||||
Gets the value of a column specified as a column index as a
java.io.Reader object.
| |||||||||||
Gets the value of a column specified as a column name as a java.io.Reader
object.
| |||||||||||
Gets the value of a column specified as a column name as a java.sql.Clob.
| |||||||||||
Gets the value of a column specified as a column index as a
java.sql.Clob.
| |||||||||||
Gets the concurrency mode of this ResultSet.
| |||||||||||
Gets the name of the SQL cursor of this ResultSet.
| |||||||||||
Gets the value of a column specified as a column name, as a java.sql.Date
object.
| |||||||||||
Gets the value of a column specified as a column index as a
java.sql.Date.
| |||||||||||
Gets the value of a column specified as a column name as a java.sql.Date.
| |||||||||||
Gets the value of a column specified as a column index as a
java.sql.Date.
| |||||||||||
Gets the value of a column specified as a column index as a double value.
| |||||||||||
Gets the value of a column specified as a column name as a double value.
| |||||||||||
Gets the direction in which rows are fetched for this ResultSet object.
| |||||||||||
Gets the fetch size (in number of rows) for this ResultSet
| |||||||||||
Gets the value of a column specified as a column index as a float value.
| |||||||||||
Gets the value of a column specified as a column name as a float value.
| |||||||||||
Gets the value of a column specified as a column name, as an int value.
| |||||||||||
Gets the value of a column specified as a column index as an int value.
| |||||||||||
Gets the value of a column specified as a column name, as a long value.
| |||||||||||
Gets the value of a column specified as a column index as a long value.
| |||||||||||
Gets the Metadata for this ResultSet.
| |||||||||||
Gets the value of a column specified as a column name as a Java Object.
| |||||||||||
Gets the value of a specified column as a Java Object.
| |||||||||||
Gets the value of a column specified as a column index as a Java Object.
| |||||||||||
Gets the value of a specified column as a Java Object.
| |||||||||||
Gets the value of a column specified as a column name as a Java
java.sql.Ref.
| |||||||||||
Gets the value of a column specified as a column index as a Java
java.sql.Ref.
| |||||||||||
Gets the number of the current row in the ResultSet.
| |||||||||||
Gets the value of a column specified as a column index as a short value.
| |||||||||||
Gets the value of a column specified as a column name, as a short value.
| |||||||||||
Gets the Statement that produced this ResultSet.
| |||||||||||
Gets the value of a column specified as a column name, as a String.
| |||||||||||
Gets the value of a column specified as a column index as a String.
| |||||||||||
Gets the value of a column specified as a column index as a java.sql.Time
value.
| |||||||||||
Gets the value of a column specified as a column index, as a
java.sql.Time value.
| |||||||||||
Gets the value of a column specified as a column index as a java.sql.Time
value.
| |||||||||||
Gets the value of a column specified as a column name, as a java.sql.Time
value.
| |||||||||||
Gets the value of a column specified as a column name, as a
java.sql.Timestamp value.
| |||||||||||
Gets the value of a column specified as a column index as a
java.sql.Timestamp value.
| |||||||||||
Gets the value of a column specified as a column index, as a
java.sql.Timestamp value.
| |||||||||||
Gets the value of a column specified as a column name, as a
java.sql.Timestamp value.
| |||||||||||
Gets the type of the ResultSet.
| |||||||||||
Gets the value of a column specified as a column index as a java.net.URL.
| |||||||||||
Gets the value of a column specified as a column name as a java.net.URL
object.
| |||||||||||
This method is deprecated.
Use getCharacterStream(int)
Gets the value of the column as an InputStream of Unicode characters. | |||||||||||
This method is deprecated.
Use getCharacterStream(int).
Gets the value of the column as an InputStream of Unicode characters. | |||||||||||
Gets the first warning generated by calls on this ResultSet.
| |||||||||||
Insert the insert row into the ResultSet and into the underlying
database.
| |||||||||||
Gets if the cursor is after the last row of the ResultSet.
| |||||||||||
Gets if the cursor is before the first row of the ResultSet.
| |||||||||||
Gets if the cursor is on the first row of the ResultSet.
| |||||||||||
Gets if the cursor is on the last row of the ResultSet
| |||||||||||
Shifts the cursor position to the last row of the ResultSet.
| |||||||||||
Moves the cursor to the remembered position, usually the current row.
| |||||||||||
Moves the cursor position to the Insert row.
| |||||||||||
Shifts the cursor position down one row in this ResultSet object.
| |||||||||||
Relocates the cursor position to the preceding row in this ResultSet.
| |||||||||||
Refreshes the current row with its most up to date value in the database.
| |||||||||||
Moves the cursor position up or down by a specified number of rows.
| |||||||||||
Indicates whether a row has been deleted.
| |||||||||||
Indicates whether the current row has had an insertion operation.
| |||||||||||
Indicates whether the current row has been updated.
| |||||||||||
Indicates which direction (forward/reverse) will be used to process the
rows of this ResultSet object.
| |||||||||||
Indicates the amount of rows to fetch from the database when extra rows
are required for this ResultSet.
| |||||||||||
Updates a column specified by a column index with a java.sql.Array value.
| |||||||||||
Updates a column specified by a column name with a java.sql.Array value.
| |||||||||||
Updates a column specified by a column name with an Ascii stream value.
| |||||||||||
Updates a column specified by a column index with an ASCII stream value.
| |||||||||||
Updates a column specified by a column index with a java.sql.BigDecimal
value.
| |||||||||||
Updates a column specified by a column name with a java.sql.BigDecimal
value.
| |||||||||||
Updates a column specified by a column name with a binary stream value.
| |||||||||||
Updates a column specified by a column index with a binary stream value.
| |||||||||||
Updates a column specified by a column index with a java.sql.Blob value.
| |||||||||||
Updates a column specified by a column name with a java.sql.Blob value.
| |||||||||||
Updates a column specified by a column name with a boolean value.
| |||||||||||
Updates a column specified by a column index with a boolean value.
| |||||||||||
Updates a column specified by a column name with a byte value.
| |||||||||||
Updates a column specified by a column index with a byte value.
| |||||||||||
Updates a column specified by a column name with a byte array value.
| |||||||||||
Updates a column specified by a column index with a byte array value.
| |||||||||||
Updates a column specified by a column index with a character stream
value.
| |||||||||||
Updates a column specified by a column name with a character stream
value.
| |||||||||||
Updates a column specified by a column name with a java.sql.Clob value.
| |||||||||||
Updates a column specified by a column index with a java.sql.Clob value.
| |||||||||||
Updates a column specified by a column name with a java.sql.Date value.
| |||||||||||
Updates a column specified by a column index with a java.sql.Date value.
| |||||||||||
Updates a column specified by a column index with a double value.
| |||||||||||
Updates a column specified by a column name with a double value.
| |||||||||||
Updates a column specified by a column index with a float value.
| |||||||||||
Updates a column specified by a column name with a float value.
| |||||||||||
Updates a column specified by a column name with an int value.
| |||||||||||
Updates a column specified by a column index with an int value.
| |||||||||||
Updates a column specified by a column index with a long value.
| |||||||||||
Updates a column specified by a column name with a long value.
| |||||||||||
Updates a column specified by a column index with a null value.
| |||||||||||
Updates a column specified by a column name with a null value.
| |||||||||||
Updates a column specified by a column index with an Object value.
| |||||||||||
Updates a column specified by a column index with an Object value.
| |||||||||||
Updates a column specified by a column name with an Object value.
| |||||||||||
Updates a column specified by a column name with an Object value.
| |||||||||||
Updates a column specified by a column index with a java.sql.Ref value.
| |||||||||||
Updates a column specified by a column name with a java.sql.Ref value.
| |||||||||||
Updates the database with the new contents of the current row of this
ResultSet object.
| |||||||||||
Updates a column specified by a column name with a short value.
| |||||||||||
Updates a column specified by a column index with a short value.
| |||||||||||
Updates a column specified by a column name with a String value.
| |||||||||||
Updates a column specified by a column index with a String value.
| |||||||||||
Updates a column specified by a column index with a Time value.
| |||||||||||
Updates a column specified by a column name with a Time value.
| |||||||||||
Updates a column specified by a column index with a Timestamp value.
| |||||||||||
Updates a column specified by column name with a Timestamp value.
| |||||||||||
Determines if the last column read from this ResultSet contained SQL
NULL.
| |||||||||||
A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked.
A constant used to indicate the Concurrency Mode for a ResultSet object that cannot be updated.
A constant used to indicate the Concurrency Mode for a ResultSet object that can be updated.
A constant used to indicate processing of the rows of a ResultSet in the forward direction, first to last
A constant used to indicate processing of the rows of a ResultSet in the reverse direction, last to first
A constant used to indicate that the order of processing of the rows of a ResultSet is unknown.
A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked.
A constant used to indicate a ResultSet object whose Cursor can only move forward
A constant used to indicate a ResultSet object which is Scrollable but which is not sensitive to changes made by others
A constant used to indicate a ResultSet object which is Scrollable but which is sensitive to changes made by others
Moves the Cursor to a specified row number in the ResultSet.
| row | The new row number for the Cursor |
|---|
| SQLException | if a database error happens |
|---|
Moves the Cursor to the end of the ResultSet, after the last row.
| SQLException | if a database error happens |
|---|
Moves the Cursor to the start of the ResultSet, before the first row.
| SQLException | if a database error happens |
|---|
Cancels any updates made to the current row in the ResultSet.
| SQLException | if a database error happens |
|---|
Clears all the warnings related to this ResultSet.
| SQLException | if a database error happens |
|---|
Releases this ResultSet's database and JDBC resources. You are strongly advised to use this method rather than relying on the release being done when the ResultSet's finalize method is called during garbage collection process. Note that the close() method might take some time to complete since it is dependent on the behaviour of the connection to the database and the database itself.
| SQLException | if a database error happens |
|---|
Deletes the current row from the ResultSet and from the underlying database.
| SQLException | if a database error happens |
|---|
Gets the index number for a column in the ResultSet from the provided Column Name.
| columnName | the column name |
|---|
| SQLException | if a database error happens |
|---|
Shifts the cursor position to the first row in the ResultSet.
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a java.sql.Array.
| colName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the content of a column specified as a column index in the current row of this ResultSet as a java.sql.Array.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as an ASCII character stream.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as an ASCII character stream.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
This method is deprecated.Gets the value of a column specified as a column name, as a java.math.BigDecimal.
| columnName | the name of the column to read |
|---|---|
| scale | the number of digits after the decimal point |
| SQLException | if a database error happens |
|---|
This method is deprecated.Gets the value of a column specified as a column index as a java.math.BigDecimal.
| columnIndex | the index of the column to read |
|---|---|
| scale | the number of digits after the decimal point |
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.math.BigDecimal.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a java.math.BigDecimal.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a binary stream.
This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a binary stream.
This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Blob object.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a java.sql.Blob object.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a boolean.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a boolean.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a byte.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a byte.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a byte array.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a byte array.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.io.Reader object.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a java.io.Reader object.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a java.sql.Clob.
| colName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Clob.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the concurrency mode of this ResultSet.
| SQLException | if a database error happens |
|---|
Gets the name of the SQL cursor of this ResultSet.
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a java.sql.Date object.
| columnName | the name of the column to read |
|---|---|
| cal | java.util.Calendar to use in constructing the Date. |
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Date.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a java.sql.Date.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Date. This method uses a supplied calendar to compute the Date.
| columnIndex | the index of the column to read |
|---|---|
| cal | a java.util.Calendar to use in constructing the Date. |
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a double value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a double value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the direction in which rows are fetched for this ResultSet object.
| SQLException | if a database error happens |
|---|
Gets the fetch size (in number of rows) for this ResultSet
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a float value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a float value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as an int value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as an int value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a long value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a long value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the Metadata for this ResultSet. This defines the number, types and properties of the columns in the ResultSet.
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a Java Object.
The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.
| columnName | the name of the column to read |
|---|---|
| map | a java.util.Map containing a mapping from SQL Type names to Java classes. |
| SQLException | if a database error happens |
|---|
Gets the value of a specified column as a Java Object. The type of the returned object will be the default according to the column's SQL type, following the JDBC specification for built-in types.
For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap())
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a Java Object.
The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.
| columnIndex | the index of the column to read |
|---|---|
| map | a java.util.Map containing a mapping from SQL Type names to Java classes. |
| SQLException | if a database error happens |
|---|
Gets the value of a specified column as a Java Object. The type of the returned object will be the default according to the column's SQL type, following the JDBC specification for built-in types.
For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap())
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a Java java.sql.Ref.
| colName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a Java java.sql.Ref.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the number of the current row in the ResultSet. Row numbers start at 1 for the first row.
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a short value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a short value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the Statement that produced this ResultSet. If the ResultSet was not created by a Statement (eg it was returned from one of the DatabaseMetaData methods), null is returned.
| SQLException |
|---|
Gets the value of a column specified as a column name, as a String.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a String.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Time value. The supplied Calendar is used to map between the SQL Time value and the Java Time value.
| columnIndex | the index of the column to read |
|---|---|
| cal | a Calendar to use in creating the Java Time value. |
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index, as a java.sql.Time value. The supplied Calendar is used to map between the SQL Time value and the Java Time value.
| columnName | the name of the column to read |
|---|---|
| cal | a Calendar to use in creating the Java Time value. |
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Time value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a java.sql.Time value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a java.sql.Timestamp value.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index as a java.sql.Timestamp value.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column index, as a java.sql.Timestamp value. The supplied Calendar is used to map between the SQL Timestamp value and the Java Timestamp value.
| columnIndex | the index of the column to read |
|---|---|
| cal | Calendar to use in creating the Java Timestamp value. |
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name, as a java.sql.Timestamp value. The supplied Calendar is used to map between the SQL Timestamp value and the Java Timestamp value.
| columnName | the name of the column to read |
|---|---|
| cal | Calendar to use in creating the Java Timestamp value. |
| SQLException | if a database error happens |
|---|
Gets the type of the ResultSet.
| SQLException | if there is a database error |
|---|
Gets the value of a column specified as a column index as a java.net.URL.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the value of a column specified as a column name as a java.net.URL object.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
This method is deprecated.Use getCharacterStream(int)
Gets the value of the column as an InputStream of Unicode characters.
| columnName | the name of the column to read |
|---|
| SQLException | if a database error happens |
|---|
This method is deprecated.Use getCharacterStream(int).
Gets the value of the column as an InputStream of Unicode characters.
| columnIndex | the index of the column to read |
|---|
| SQLException | if a database error happens |
|---|
Gets the first warning generated by calls on this ResultSet. Subsequent warnings on this ResultSet are chained to the first one.
The warnings are cleared when a new Row is read from the ResultSet. The warnings returned by this method are only the warnings generated by ResultSet method calls - warnings generated by Statement methods are held by the Statement.
An SQLException is generated if this method is called on a closed ResultSet.
| SQLException | if a database error happens |
|---|
Insert the insert row into the ResultSet and into the underlying database. The Cursor must be set to the Insert Row before this method is invoked.
| SQLException | if a database error happens. Particular cases include the Cursor not being on the Insert Row or if any Columns in the Row do not have a value where the column is declared as not-nullable. |
|---|
Gets if the cursor is after the last row of the ResultSet.
| SQLException | if a database error happens |
|---|
Gets if the cursor is before the first row of the ResultSet.
| SQLException | if a database error happens |
|---|
Gets if the cursor is on the first row of the ResultSet.
| SQLException | if a database error happens |
|---|
Gets if the cursor is on the last row of the ResultSet
| SQLException |
|---|
Shifts the cursor position to the last row of the ResultSet.
| SQLException | if there is a database error |
|---|
Moves the cursor to the remembered position, usually the current row. This only applies if the cursor is on the Insert row.
| SQLException | if a database error happens |
|---|
Moves the cursor position to the Insert row. The current position is
remembered and the cursor is positioned at the Insert row. The columns in
the Insert row should be filled in with the appropriate update methods,
before calling insertRow to insert the new row into the
database.
| SQLException | if a database error happens |
|---|
Shifts the cursor position down one row in this ResultSet object.
Any InputStreams associated with the current row are closed and any warnings are cleared.
| SQLException | if a database error happens |
|---|
Relocates the cursor position to the preceding row in this ResultSet.
| SQLException | if a database error happens |
|---|
Refreshes the current row with its most up to date value in the database. Must not be called when the cursor is on the Insert row.
If any columns in the current row have been updated but the
updateRow has not been called, then the updates are lost
when this method is called.
| SQLException | if a database error happens, including if the current row is the Insert row. |
|---|
Moves the cursor position up or down by a specified number of rows. If the new position is beyond the start or end rows, the cursor position is set before the first row/after the last row.
| rows | a number of rows to move the cursor - may be positive or negative |
|---|
| SQLException | if a database error happens |
|---|
Indicates whether a row has been deleted. This method depends on whether the JDBC driver and database can detect deletions.
| SQLException | if a database error happens |
|---|
Indicates whether the current row has had an insertion operation. This method depends on whether the JDBC driver and database can detect insertions.
| SQLException | if a database error happens |
|---|
Indicates whether the current row has been updated. This method depends on whether the JDBC driver and database can detect updates.
| SQLException | if a database error happens |
|---|
Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object. This is treated as a hint by the JDBC driver.
| direction | can be ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN |
|---|
| SQLException | if there is a database error |
|---|
Indicates the amount of rows to fetch from the database when extra rows are required for this ResultSet. This used as a hint to the JDBC driver.
| rows | the number of rows to fetch. 0 implies that the JDBC driver can make its own decision about the fetch size. The number should not be greater than the maximum number of rows established by the Statement that generated the ResultSet. |
|---|
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a java.sql.Array value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a java.sql.Array value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with an Ascii stream value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| length | the length of the data to write from the stream |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with an ASCII stream value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| length | the length of the data to write from the stream |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a java.sql.BigDecimal value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a java.sql.BigDecimal value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a binary stream value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a binary stream value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a java.sql.Blob value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a java.sql.Blob value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a boolean value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a boolean value.
| x | the new value for the specified column |
|---|
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a byte value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a byte value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a byte array value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a byte array value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a character stream value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| length | the length of data to write from the stream |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a character stream value.
| columnName | the name of the column to update |
|---|---|
| reader | the new value for the specified column |
| length | the length of data to write from the Reader |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a java.sql.Clob value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a java.sql.Clob value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a java.sql.Date value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a java.sql.Date value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a double value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a double value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a float value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a float value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with an int value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with an int value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a long value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a long value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a null value.
| columnIndex | the index of the column to update |
|---|
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a null value.
| columnName | the name of the column to update |
|---|
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with an Object value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with an Object value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| scale | for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits after the decimal point. |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with an Object value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with an Object value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| scale | for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits after the decimal point. |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a java.sql.Ref value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a java.sql.Ref value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates the database with the new contents of the current row of this ResultSet object.
| SQLException |
|---|
Updates a column specified by a column name with a short value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a short value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a String value.
| columnName | the name of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a String value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a Time value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by a column name with a Time value.
| x | the new value for the specified column |
|---|
| SQLException | if a database error happens |
|---|
Updates a column specified by a column index with a Timestamp value.
| columnIndex | the index of the column to update |
|---|---|
| x | the new value for the specified column |
| SQLException | if a database error happens |
|---|
Updates a column specified by column name with a Timestamp value.
| columnName | the name of the column to update |
|---|
| SQLException | if a database error happens |
|---|
Determines if the last column read from this ResultSet contained SQL NULL.
| SQLException | if a database error happens |
|---|