Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    5

    Unanswered: Return resultset from SP

    Hi guys , i have a big problem with this requeriment,

    I need create a stored procedure with the following structure

    In parameters:
    String cod
    String date

    Out Parameters:
    String flag
    String type

    Resultset:
    id | name | country

    My problem is how can I capture out parameters and resultset from Java, is it possible doing that?????

    pd:sorry for my english

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2009
    Posts
    5
    Thanks n_i!!

    Code:
    //Register out parameter
    cstmt.registerOutParameter (1, Types.INTEGER);   
    
    cstmt.executeUpdate(); 
    
    //getting out parameter
    ifcaret = cstmt.getInt(1);
    But, if SP also return ResultSet, can I read it in same object "cstmt"??

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by xerg

    But, if SP also return ResultSet, can I read it in same object "cstmt"??
    You certainly can, but only if you read the document I indicated earlier.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •