efungkw
asked on
multi ResultSet?
Hi all,
Can I do the multi ResultSet?
for example.
Statement state = myConn.createStatement();
// the first resultset
ResultSet testRS = state.executeQuery("select * from testing");
if (testRS.next()){
//out.println("anything here");
do{
//the second result set with the testRS id
ResultSet ndRS = state.executeQuery("select * from nd where nd_id=" + testRS.test_id);
if (ndRS.next()){
do{
//out.println("Result here!");
}
}
}while (testRS.next());
}
after I added this code, it shows:
Operation not allowed after ResultSet closed
Why it said ResultSet is closed?
How can I settle it?
Thanks,
Eric.
Can I do the multi ResultSet?
for example.
Statement state = myConn.createStatement();
// the first resultset
ResultSet testRS = state.executeQuery("select
if (testRS.next()){
//out.println("anything here");
do{
//the second result set with the testRS id
ResultSet ndRS = state.executeQuery("select
if (ndRS.next()){
do{
//out.println("Result here!");
}
}
}while (testRS.next());
}
after I added this code, it shows:
Operation not allowed after ResultSet closed
Why it said ResultSet is closed?
How can I settle it?
Thanks,
Eric.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ooops Vk33........... I guess I am a victim of close timing......... :-)
ASKER
oh~~!!
I got it~ thanks!!!
I got it~ thanks!!!
Hah, well done Kuldeepchaturvedi! ;)