aspose file tools
The moose likes JDBC and the fly likes ResultSet Thru ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "ResultSet Thru ResultSet" Watch "ResultSet Thru ResultSet" New topic
Author

ResultSet Thru ResultSet

Sanjay Deshpande
Ranch Hand

Joined: May 22, 2001
Posts: 111
I have a result set rs.
Depending on some value from rs i wanna get another resultset rs2with diff query.
How to do this?
I ve code like this

IS IT OK?
[ Edited by Dave to format code ]
[ May 19, 2002: Message edited by: David O'Meara ]
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

you might want to change

to this

Also, if you expect many rs1's, then it might be worth your while to use a prepared statement in the while loop.
Jamie
Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
U may also consider putting creating and closing the Statement calls for the second rs outside the loop. U may check time-difference among the two processes and decide.

MSM
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet Thru ResultSet
 
Similar Threads
two dropdown menus
junk characters for byte charset
nested resultsets
I M NOT ABLE TO DEFINE VARIABLES IN JSP.
stored procedures in a loop... what gives?