Service Virtualization

Expand all | Collapse all

Need Help in Oracle Stored procedure execution using JDBC step

  • 1.  Need Help in Oracle Stored procedure execution using JDBC step

    Posted Nov 30, 2017 08:44 PM

    Hi All, 

     

    Greetings!

     

    I an trying to execute a oracle stored procedure  using Devtest  JDBC step but facing problem, Need help in the same.

    Execution of Stored procedure takes some inputs and provides output, So i Need to pass some parameters for the same,

    I am able to locate all other parameter types but not sure how handle output parameter, 

    which has below data types, 

                                 Oracle Data type-> RefCursor

                                 Data type --> Object

                                 Value --> Null(when passing Empty value it is throwing error "Value at index 11 needs to be property 

                                                   for OUT or INOUT mode.")   

                                 Direction-Output    

     

    I am working with Devtest 9.0



  • 2.  Re: Need Help in Oracle Stored procedure execution using JDBC step



  • 3.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 01, 2017 10:12 PM

    Yes i have checked above links but not helpful.



  • 4.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 01, 2017 02:22 PM

    Hi,

          Create a DevTest property and pass it as "Out" parameter in your SP.The property will hold the output value.

    Thanks,

    Vish



  • 5.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 01, 2017 10:11 PM

    Hi Vish, 

     

    Thanks for replying. 

    I have tried the same but it is responding with "wrong number or types of arguments in call" what should i select in type as it is returning "Oracle Data type-> RefCursor, Data type --> Object"?



  • 6.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 04, 2017 11:24 AM

    Hi,

         Can you post  the sample query you are trying to execute?

    Thanks,

    Vish



  • 7.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 06, 2017 06:43 PM

    Here is sample for your reference, 

    Stored procedure:

    begin
    testuser.GetInteractiont(:1,:2,:3);
    end;

     

    Parameters definations,
    1-->in-->String
    2-->in-->String
    3-->Out-->sys_refcursor;



  • 8.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 06, 2017 07:07 PM

    Hi,

    Stored procedure:

    DECLARE
    Outputvariable Datatype;

    begin 
    testuser.GetInteractiont(:1,:2,:Outputvariable);
    end;

     

    Parameters definations, 
    1-->in-->String
    2-->in-->String
    Outputvariable-->Out-->sys_refcursor;

    Thanks,

    Vish



  • 9.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 07, 2017 07:23 PM

    Hi Vish, 

     

    I has tried this approach but not finding a way to print the output in Devtest,

     

    How to get the Output from declared variable as part of Stored procedure? 



  • 10.  Re: Need Help in Oracle Stored procedure execution using JDBC step

    Posted Dec 11, 2017 10:30 AM

    Hi,

          It will be available as a DevTest property.

                                Thanks,

    Vish



  • 11.  Re: Need Help in Oracle Stored procedure execution using JDBC step
    Best Answer

    Posted Dec 13, 2017 11:52 PM

    Thanks Vish for your response, but there is no way to implement above said, 

    I have done it using Java