ResultSet.getObject

ResultSet.getObject

Interface Overview | Interface Members | This Package | All Packages

Syntax 1
public abstract Object getObject( int columnIndex ) throws SQLException
Parameters
columnIndex
the first column is 1, the second is 2, ...
Returns
A java.lang.Object holding the column value.
Description

Get the value of a column in the current row as a Java object.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC spec.

This method may also be used to read datatabase specific abstract data types.

Exceptions
SQLException if a database-access error occurs.



Syntax 2
public abstract Object getObject( String columnName ) throws SQLException
Parameters
columnName
is the SQL name of the column
Returns
A java.lang.Object holding the column value.
Description

Get the value of a column in the current row as a Java object.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC spec.

This method may also be used to read datatabase specific abstract data types.

Exceptions
SQLException if a database-access error occurs.