ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Stored Procedures for Java Programmers
Subject:   JDBC support for Cursors
Date:   2003-08-15 10:45:59
From:   gokulsingh
<extract>Because returning cursors from procedures is not directly supported by JDBC, we use Types.OTHER to declare the return type of the procedure and then cast from the call to getObject().</extract>


JDBC does support returning of Cursors as ResultSet. The javadocs state the following :


"A CallableStatement can return one ResultSet or multiple ResultSet objects. Multiple ResultSet objects are handled using operations inherited from Statement."


I have worked with stored procedures on DB2 where a open cursor in the stored procedure was returned as a result set via the method CallableStatement.executeQuery().


1 to 1 of 1
  1. JDBC support for Cursors
    2003-08-15 13:14:07  nferrier [View]

1 to 1 of 1