| Author |
can you execute a query while processing results
|
Robert Johnson
Ranch Hand
Joined: Feb 11, 2005
Posts: 32
|
|
can you execute a query in the while loop of a different resultSet? e.g.,... it only works once, it stops at the end of the while loop, i.e., it doesnt loop around the resultSet like it should. [edited to add code tags and change "u" to "you"] [ March 24, 2005: Message edited by: Jeanne Boyarsky ]
|
Whats in a name?
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
Robert, Executing the update on stmt indirectly closes the select query also using the stmt object. If you use a different Statement object, the problem will go away. Also, you should consider using a PreparedStatement here. Especially since the update is occuring in a loop.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Robert Johnson
Ranch Hand
Joined: Feb 11, 2005
Posts: 32
|
|
ok, thanks i'll try that. i would have thought it wouldnt need the statment object as i thought it just used it once and then loop around the resultSet only.
|
 |
 |
|
|
subject: can you execute a query while processing results
|
|
|