Re: Prepared Statement




"lakshmi Ashok" wrote...

Am I getting this correct?
There are drivers that procure the result set into the calling program
memory space .. and will let me iterate the result set even after
releasing the connection?

There *might* be, as this is completely up to the implementor.

But I wouldn't count on finding any such implementations, as it's not a
requirement. On the contrary, the ResultSet interface states in the API:

"A ResultSet object is automatically closed when the Statement object that
generated it is closed, re-executed, or used to retrieve the next result
from a sequence of multiple results."

http://java.sun.com/j2se/1.5.0/docs/api/java/sql/ResultSet.html

If you want a "disconnected ResultSet", you have a better chance to look
into any implementations of RowSet, e.g. CachedRowSet:

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html


/// Bjorn A





Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php
.



Relevant Pages

  • Re: JDK1.6 wont compile my JDK1.5 code
    ... of the respective interface, and each method just calls the same ... the DB-drivers' authors' job to update the implementations for each ... of the delegating class would have the same problem. ... ResultSet wrappedRs=new ResultSetDelegator{ ...
    (comp.lang.java.programmer)
  • Re: ResultSet on RMI
    ... Frogman wrote: ... > I'm trying to pass the ResultSet object to an RMI client and I ... > realized that this will not work since ResultSet is not serializable. ...
    (comp.lang.java.programmer)
  • Re: Count the nuimber of results in a Result Set
    ... > that line rs.firstin order to continue on after counting the number ... > the first row in the ResultSet. ... I had to make my own resultset object from the orginal resultset that ... application then used my custom rs object instead of a real ResultSet. ...
    (comp.lang.java.databases)
  • Re: Count the nuimber of results in a Result Set
    ... >> use that line rs.firstin order to continue on after counting the ... >> can't go to the first row in the ResultSet. ... > I had to make my own resultset object from the orginal resultset that ...
    (comp.lang.java.databases)
  • ResultSet on RMI
    ... I'm trying to pass the ResultSet object to an RMI client and I ... complicated for developers to use. ...
    (comp.lang.java.programmer)