This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

intersolv JDBC driver for DB2 on OS/390  RSS feed

 
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
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!