This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to return a cursor in DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to return a cursor in DB2" Watch "How to return a cursor in DB2" New topic
Author

How to return a cursor in DB2

Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
Hi guys ,

I want to return the cursor in db2 to retrieve the resultset from
my java application .Keeping the cursor open dosen't help and the resultset always returns a null though the procedure runs fine from the command line. Any ideas .

Regards,
Av~

CallableStatement stmt3 = HibernateApp.getHibernateSession().connection().prepareCall("{call answers_select_id( ? )}");
stmt3.setString(1,20);
stmt3.execute();
ResultSet rs1 = stmt3.getResultSet();
System.out.println("rs1 " + rs1); --> returns null
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to return a cursor in DB2
 
Similar Threads
JDBC Help figuring it out
intersolv JDBC driver for DB2 on OS/390
multiple processes... only want one
Resultset returns null from a srored procedure in db2
java Date problem