Oh and.... I think TYPE_FORWARD_ONLY means the result set is limited in such a way that each row in the result set may only be visited once and the result set has to be traversed from front to end. The usual way of doing this in java is:
rs = stmt.executeQuery(sQuery); while (rs.next()) { System.out.println(rs.getString("someColumn")); } Why? Because when you initially get rs, it is pointing at a position before the first row. Calling rs.next() moves the row position forward by one, and returns true if it is now pointing at a valid row. You need to call rs.next() before you can get anything from rs. There is no way to move the row position back, so if you need to do fancy stuff you will have to iterate through the rows and copy them into some structure of your own first (Vector maybe...) and use that. ChrisC > -----Original Message----- > From: Nicholas Orr [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 4:22 PM > To: Tomcat Users List > Subject: Having a Newbie Delamere here. > > > Again coming from the ASP world of doing things. > in ASP you can open a connection to a Database (DB) and > execute a bunch of > queries and do whatever you need to then after you have > finished close the > connection. > > Now I have tried to do this in jsp, but not having much luck. > Keep getting > 'Result set type is TYPE_FORWARD_ONLY' > > Cause In ASP when you start a new ResultSet, after you have closed the > previous one, (asp equiv = recordset) It automatically goes > back to the > begining as it should, but in jsp it seems to just hang > around at rs.last(). > > !I don't know! > > Well if you could help, I would appreciate it, Source included. > > Regards, > > Nicholas > > > > > ********************************************************************** > The information contained in this e-mail is confidential and is > intended only for the use of the addressee(s). > If you receive this e-mail in error, any use, distribution or > copying of this e-mail is not permitted. You are requested to > forward unwanted e-mail and address any problems to the > MIM Holdings Limited Support Centre. > > For general enquires: ++61 7 3833 8000 > Support Centre e-mail: [EMAIL PROTECTED] > Support Centre phone: Australia 1800500646 > International ++61 7 38338042 > ********************************************************************** > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>