|
Hello :)
This is an off-topic question..just kidding..you can put away your .38
special... ;)
In short, I'm trying to manipulate a resultset. I'd like to
maintain the position of my select statement in a session.
Here is some sample code (using a ROWID approach).
HttpSession session = req.getSession(true);
if(session.isNew())
{ session.putValue("row_count1", new String("AAACqqAACAAAAEHAAA")); } String row_count1 = (String)session.getValue("row_count1");
stmt = conn.createStatement(); ps = conn.prepareStatement("SELECT ename, rowid FROM emp WHERE rowid > ?"); ps.setString(1,row_count1);
rs = ps.executeQuery(); rs.next(); String ename = rs.getString(1);
// oracle.sql.ROWID rowid = (oracle.sql.ROWID) ((OracleResultSet)rs).getObject(2); String rowid = rs.getString(2); session.putValue("row_count1", rowid); As you can see I'm attempting to control my select statement based on the
most recent rowid (which I stored as a session object). I'm guessing there
must be a better way to go about doing this. I've looked over the archives, and
there seems be mention of hidden fields, Vectors,etc.. Which might be the
best approach for what I'm trying to accomplish? (control a resultset)
Kindest Regards,
Robert
|
- Re: ResultSet-Session Robert Pimentel
- Re: ResultSet-Session Nic Ferrier
- Re: ResultSet-Session Srini
- Re: ResultSet-Session Robert Pimentel
- Re: ResultSet-Session Daniel Thomas
