Home » Developer & Programmer » JDeveloper, Java & XML » OracleCachedRowSet
OracleCachedRowSet [message #92753] Thu, 06 January 2005 14:11 Go to next message
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.
Re: OracleCachedRowSet [message #92823 is a reply to message #92753] Thu, 10 February 2005 15:04 Go to previous message
Carlos Alvarez
Messages: 1
Registered: February 2005
Junior Member
This is a bug, you can check it in metalink.
Previous Topic: Jdeveloper help
Next Topic: how to create jdbc-odbc bridge for oracle9i with jsp
Goto Forum:
  


Current Time: Mon Nov 25 17:08:27 CST 2024