• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to return a cursor in DB2

Aravind Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .


CallableStatement stmt3 = HibernateApp.getHibernateSession().connection().prepareCall("{call answers_select_id( ? )}");
ResultSet rs1 = stmt3.getResultSet();
System.out.println("rs1 " + rs1); --> returns null
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!