• Stored Procedure with output Parameter

    By tek prince 1 decade ago

    Hi,

    How can I get output parameter from stored procedure.

    Regards,

    Tek

    • Stored Procedure with output Parameter

      By tek prince 1 decade ago

      how can I replace the field value on XPage with output parameter value from stored procedure.

      regards,

      Naseer

      • You could do it this way

        By Andrejus Chaliapinas 1 decade ago

        Suppose in your DB2 you have your User Defined Function/Stored Procedure "my_function1" defined which takes one VARCHAR parameter as an input and returns VARCHAR as an output. Then to show that as some text field - you could use this technique ("db2demo" is my connection definition):

         

            
             
               var query = "select my_function1('OpenNTF') as col1 from sysibm.dual";
        var resultSet = @JdbcExecuteQuery("db2demo", query);
        var text = null;
        if (resultSet.next()) {
         text = resultSet.getString("col1");
        }
        return text;}
              ]]>
             

            

         

        Please let me know if that clarifies your initial question.