OracleCachedRowSet [message #92753] |
Thu, 06 January 2005 14:11 |
VÃctor Garrido
Messages: 1 Registered: January 2005
|
Junior Member |
|
|
Oracle9i Enterprise Edition Release 9.2.0.4.0
Oracle JDBC Drivers release 9.0.1
Does anyone knows where can I find the complete api doc for the OracleCachedRowSet class?.
is there a way to use populate of OracleCachedRowSet without loosing the connection?
If I use a method like this
public int countUsingCachedRowSet(ResultSet pRs) throws Exception {
int contador =-1;
// Crea e inicializa el objeto Cached RowSet.
OracleCachedRowSet ocrs = new OracleCachedRowSet();
try {
ocrs.populate(pRs);
// Apunta al último registro del Cached RowSet.
ocrs.last();
// Obtiene el número de renglón actual, el cual representa el n. total
// de registros del Cached RowSet.
contador = ocrs.getRow();
// Close the Cached Rowset object.
//if (ocrs != null)
// ocrs.close();
} catch(SQLException sqle){
this.error+="Error "+sqle.getErrorCode()+" n";
this.error+="Message: Counting records -> "+sqle.toString();
System.out.println(this.error);
} catch(Exception ex) {
System.out.println("Exception "+ ex.getMessage());
} finally {
try {
// Close the Cached RowSet object.
if (ocrs != null)
ocrs.close();
} catch(Exception ex) {
System.out.println("Exception encountered: "+ ex.getMessage());
}
}
return contador;
}
to get the number of records of the result set pRs, the connection of such pRs is lost.
|
|
|
|