1 Reply Latest reply on Nov 17, 2012 9:54 AM by kdario

    ResultSet value is null, while there is data in the table.

    $AM$
      Hi Friends,

      I am using JDeveloper 11.1.1.5.0.

      I have written one method in the ApplicationModule. In this method I am calling a stored procedure which returns a cursor and storing the cursor in a resultset. While trying to get the result set in a VO, the resultSet is giving null. rs.next() is returning "false". But it should return "true".The code is given below:

      CallableStatement cst = null;

      RowSetIterator rt = null;

      rt = this.getMyVO1().getRowSetIterator();

      try {

      cst =
      getDBTransaction().createCallableStatement("begin ? := My_PKG.get_details_fnc(?); end;",
      0);

      cst.registerOutParameter(1, OracleTypes.CURSOR);
      cst.setString(2, id);

      cst.executeUpdate();
      ResultSet rs = null;


      rs = (ResultSet)cst.getObject(1);


      ResultSetMetaData rsMetaData = rs.getMetaData();

      rt = this.clearRowSet(rt);

      while(rs.next())
      {
      //.................Some code is there
      }

      Please help.

      Thanks,

      $@M$