| To: | users@xxxxxxxxxx |
|---|---|
| Subject: | Re: [cinjug-users] ResultSet closing prematurely |
| From: | "Jason Kretzer/STAR BASE Consulting Inc." <JKretzer@xxxxxxxxxxxxxxx> |
| Date: | Thu, 20 May 2004 16:41:50 -0400 |
| Delivered-to: | mailing list users@cinjug.org |
| In-reply-to: | <OFE4CE3EBF.40221676-ON85256E9A.006F6AA2-85256E9A.006F7DB6@starbaseinc.com> |
| Mailing-list: | contact users-help@cinjug.org; run by ezmlm |
|
Found it. I was not aware that you could not use the ResultSet as part of another query. Inside the while loop, I was executing another query with a call to rs.getString(1) in it and that caused the exception. Thanks all! -Jason
I have a query that returns two records and using a standard while loop, I get the records. For some reason the loop is only entered once and then I get the exception at the bottom on the second iteration. The exception references the while(rs.next()) Anyone know what could cause this? ResultSet rs = stmt.executeQuery("some_query"); while(rs.next()) { //do something with rs } com.ibm.db2.jcc.b.SQLException: Invalid operation: result set closed |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [cinjug-users] ResultSet closing prematurely, Greg Williams |
|---|---|
| Next by Date: | We're Back...Join us for the Southern Ohio Software Symposium coming to Cincinnati on August 6-8th, Jay Zimmerman |
| Previous by Thread: | Re: [cinjug-users] ResultSet closing prematurely, Greg Williams |
| Next by Thread: | RE: [cinjug-users] ResultSet closing prematurely, Turner, Keith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |