my dog learned polymorphism
The moose likes JDBC and the fly likes intersolv JDBC driver for DB2 on OS/390 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "intersolv JDBC driver for DB2 on OS/390" Watch "intersolv JDBC driver for DB2 on OS/390" New topic
Author

intersolv JDBC driver for DB2 on OS/390

Balki Dhar
Greenhorn

Joined: Dec 15, 2005
Posts: 18
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

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Dec 15, 2005
Posts: 18
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 agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: intersolv JDBC driver for DB2 on OS/390
 
Similar Threads
COM.ibm.db2.jdbc.DB2Exception in WSAD
JDBC Connection
nested resultsets
ResultSet Thru ResultSet
JDBC Connection