Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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
 
I'm still in control here. LOOK at this tiny ad!
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!