DB2 Version 9.7 for Linux, UNIX, and Windows

DB2ResultSet interface

The com.ibm.db2.jcc.DB2ResultSet interface is used to create objects from which IBM® Data Server Driver for JDBC and SQLJ-only query information can be obtained.

DB2ResultSet implements the java.sql.Wrapper interface.

DB2ResultSet methods

The following methods are defined only for the IBM Data Server Driver for JDBC and SQLJ.

getDB2RowChangeToken
Format:
public long DB2ResultSet.getDB2RowChangeToken()
  throws java.sql.SQLException

Returns the row change token for the current row, if it is available. Returns 0 if optimistic locking columns were not requested or are not available.

This method applies only to connections to DB2® for Linux, UNIX, and Windows.

getDB2RID
Format:
public Object DB2ResultSet.getDB2RID()
  throws java.sql.SQLException

Returns the RID for the current row, if it is available. The RID is available if optimistic locking columns were requested and are available. Returns null if optimistic locking columns were not requested or are not available.

This method applies only to connections to DB2 for Linux, UNIX, and Windows.

getDB2RIDType
Format:
public int DB2ResultSet.getDB2RIDType()
  throws java.sql.SQLException

Returns the data type of the RID column in a DB2ResultSet. The returned value maps to a java.sql.Types constant. If the DB2ResultSet does not contain a RID column, java.sql.Types.NULL is returned.

This method applies only to connections to DB2 for Linux, UNIX, and Windows.

getDBTimestamp
Formats:
public DBTimestamp getDBTimestamp(int parameterIndex) 
  throws SQLException
public DBTimestamp getDBTimestamp(String parameterName) 
  throws SQLException

Returns the value in the current row of a TIMESTAMP or TIMESTAMP WITH TIME ZONE column that is in a DB2ResultSet object as a DBTimestamp object. For a TIMESTAMP column, the returned value has the local time zone. If the value of the DB2ResultSet column is NULL, the returned value is null.

Parameters:
parameterIndex
The number of the column in the DB2ResultSet whose value is being retrieved.
parameterName
The name of the column in the DB2ResultSet whose value is being retrieved.
updateDBDefault
Formats:
public void updateDBDefault(int parameterIndex) 
  throws SQLException
public void updateDBDefault(String columnName) 
  throws SQLException

Assigns the default value to the specified column in a DB2ResultSet object. This method does not update the underlying table.

Parameters:
parameterIndex
The number of the column in the DB2ResultSet whose value is being updated.
columnName
The name of the column in the DB2ResultSet whose value is being updated.

This method is not supported for connections to IBM Informix® data sources.