Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

intersolv JDBC driver for DB2 on OS/390

 
Balki Dhar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
can I have nested results sets? We are using intersolv JDBC driver for DB2 running on OS/390.
for e.g
String qry1 = "select * from table1";
ResultSet rs1 = stmt.executeQuery(qry1);
while(rs1.next()) {
entryno = rs1.getString("Entry_Num");
String qry2 = "select * from table2 where entry_num ='" + entrtno+"'";
ResultSet rs2 = stmt.executeQuery(qry2);
while(rs2.next()){
//do process
}
rs2.close();
}
when I tried this code, it worked for small resultsets. But if the result set is huge, it is giving the error message "Invalid cursor state -306".
Thank you
dbalki
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dbalki
Can you post your full code sample here and I'll try it on my machine. I just started running os/390 & DB2 here at work and I think/hope our support team has us set up ok now. We added websphere and the driver that it uses, so if you post your code I'll let you know it works with websphere.
Thanks
 
Balki Dhar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi TomC
Thanks for your reply. Right now I am on vacation. I will be back to work after 6th of July. Then I will post the full sample code.
Thank you once again
dbalki
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic