Procedure expects parameter '@OUT'..?

Hi,
I am getting the following exception when i execute stored procedure:
com.microsoft.sqlserver.jdbc.SQLServerException: Procedure '_INR' expects parameter '@OUT', which was not supplied.
     at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
     at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)I am getting value through SQL Client. But getting exception with the following java class.
Java Class:
public class DBTest {
      * @param args
     public static void main(String[] args) {
          CallableStatement stproc_stmt = null;
          try {
               Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
               Connection con = DriverManager.getConnection("jdbc:sqlserver://univ25:1433;DatabaseName=stower1205;",
                         "ser1205","ser1205");
               System.out.println("connection ----"+con);
               stproc_stmt = con.prepareCall("{? = call IACUC_UPD_INR(?,?,?)}");
               stproc_stmt.clearParameters();
               stproc_stmt.registerOutParameter(1,Types.INTEGER);
               stproc_stmt.setInt(2,148);
              stproc_stmt.setString(3,"REVISION");
              stproc_stmt.setString(4,"michael");
              //System.out.println("stproc_stmt.execute()>>>>>>>>>"+stproc_stmt.execute());
              System.out.println("---->"+stproc_stmt);
              stproc_stmt.execute();
              SQLWarning sqlw = stproc_stmt.getWarnings();
              System.out.println(sqlw);
              System.out.println("---"+stproc_stmt.getInt(1));
              System.out.println("isInserted ============================>");
              stproc_stmt.close();
              con.close();
          } catch (Exception e) {
               e.printStackTrace();
}Can anyone please tell me the solution.
Thanks in Advance,
LALITH

sandy09 wrote:
Not sure what does 2005 means for CLOB value, I tried changing the value and also tried replacing it with oracle.sql.CLOB and still no luck ...Thus one should read the javadocs.
[http://www.oracle.com/technology/docs/tech/java/sqlj_jdbc/doc_library/javadoc/oracle.jdbc.driver.oraclecallablestatement.html#registerOutParameter(int, int)]
That value is a the 'type' of the data item. I seriously doubt that changing the value is going to solve your problem. You could probably replace it with the correct enumerated value if you wished however (it would still be 2005 though.)
>
The 2005 value seems to be working in some cases but if there are multiple requests (like 30 requests submitted in 1 min) then it is failing with "java.sql.SQLException: Invalid index for data access"
Sometimes it returns "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275ORA-06512: at "SYS.DBMS_LOB" ..
My guess would be that the data going in to your database is bad.
Thus it has nothing to do with this code (which is getting it out.)
Perhaps because the original design called one 'thingy' to be stuck in that field and someone who thought that they were brilliant decided that putting two in there shouldn't be a problem. That of course would be wrong.

Similar Messages

  • Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'."

    Hi,
    When i executed the following query i am getting following error "Msg 214, Level 16, State 2, Procedure sp_executesql, Line 1
    Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'."
    I have to store value in @EndDate variable.
    Please advise
    Declare @SQL varchar(max)
    Declare @Prd varchar(2)
    Declare @Year varchar(4)
    Declare @Wk varchar(2)
    Declare @EndDate  varchar(100)
    Declare @EndDate1  varchar(100)
    select  @Prd = RIGHT('0' + cast(AS_OF_PRD AS varchar(2)),2),
            @Year = AS_OF_YR,
            @Wk = RIGHT('0' + cast(AS_OF_WK AS varchar(2)),2)
      from SCP_HEADER
      set @SQL = 'SELECT @EndDate = WK ' + @Wk +'_END_DATE  from dbo.SCP_CAL_YEAR where CAL_YR =' + @Year
    execute SP_EXECUTESQL @SQL,N'@EndDate varchar(100) OUTPUT',@EndDate OUTPUT
      print @EndDate
    Regards,
    Amit

    Hallo Amit,
    the bug is here
    Declare @SQL nvarchar(4000)
    set @SQL = N'SELECT @EndDate = WK ' + @Wk +'_END_DATE  from dbo.SCP_CAL_YEAR where CAL_YR =' + @Year
    BTW: I'm wondering why you concatenate the SQL String but didn't put them as variables to sp_executeSQL
    Exactly that's one of the essentials of sp_executeSQL
    http://msdn.microsoft.com/en-us/library/aa933299(v=sql.80).aspx
    Uwe Ricken
    MCITP Database Administrator 2005
    MCITP Database Administrator 2008
    MCITS Microsoft SQL Server 2008, Database Development
    db Berater GmbH
    http://www-db-berater.de

  • Procedure or function expects parameter name which was not supplied

    SQL 2008R2 - BIDS
    I added an additional parameter to my SSRS Report.  I set it up identical to a couple other parameters already in the report.  I added the parameter to the dataset.  I added the parameter to the stored procedure and verified that it functions
    correctly in SSMS.
    When I Preview the report I get the Procedure expects parameter error even though the parameter is in the parameter list with a value (0) assigned.
    How can I make this work???

    Hi John,
    The most likely is the parameter name on the dataset , doesnt match the parameter you created ,the best was is to delete the parameters related to the dataset   and apply the stored procedure again  to a dataset it willl create the parameters  automatically,i
     have replicated the logic  below is  an example
    Create Procedure testp
    @Country Varchar(max),
    @Year Int
    as
    SELECT     DimSalesTerritory.SalesTerritoryCountry, DimDate.CalendarYear, FactInternetSales.SalesAmount
    FROM         FactInternetSales INNER JOIN
                          DimDate ON FactInternetSales.OrderDateKey = DimDate.DateKey INNER JOIN
                          DimSalesTerritory ON FactInternetSales.SalesTerritoryKey = DimSalesTerritory.SalesTerritoryKey
    where SalesTerritoryCountry =@Country
    And DimDate.CalendarYear=@Year
    I have just renamed one of the parameter  for year to YYear and it throws an error similar to yours 
    Many Thanks
    Chandra
    Please mark as answered If this helps to solve your issue.

  • (rsInternalError) Procedure or function 'CreateSession' expects parameter '@SiteZone', which was not supplied.

    Hi,
    Does the (Procedure or function CreateSession expects parameter @SiteZone, which was not supplied.)
    error require a complete reconfiguration of reporting services ?
    Regards

    Hi KeeperHill,
    The error message” Procedure or function 'CreateSession' expects parameter '@SiteZone', which was not supplied.” means that there is a procedure or function named CreateSession, it expects a parameter(@SiteZone) but not given.
    Based on my research, the problem can be caused by the two reasons:
    The use of null value for parameter @SiteZone, we should actually use DBNull.Value.
    Forgotten to put the following command in your code:
    cmd.CommandType = CommandType.StoredProcedure;
    For more details, please refer to the similar thread below:
    http://stackoverflow.com/questions/368642/procedure-expects-parameter-which-was-not-supplied
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to call a stored procedure which has out parameter value

    my code is
    public Connection createConnection() {
                   Connection conn = null;
                        try {
                             Class.forName(DRIVER);
                             conn = DriverManager.getConnection(URL,USER,PASS);
                        } catch (ClassNotFoundException cnfe) {
                             System.err.print("Class not found");
                        } catch (SQLException sqle) {
                             System.err.print("SQLException");
                   return conn;
         public static void main(String args[]){
              StroedProcedure stp = new StroedProcedure();
              Connection con = stp.createConnection();
              try {
                   CallableStatement stproc_stmt = con.prepareCall("{call Account_Summary(?,?,?,?,?,?,?,?)}");
                   stproc_stmt.setString(1, "123456");
                   stproc_stmt.setDate(2, null);
                   stproc_stmt.setString(3, null);
                   stproc_stmt.setString(4, null);
                   stproc_stmt.setString(5, null);
                   stproc_stmt.setString(6, null);
                   stproc_stmt.setDate(7, null);
                   stproc_stmt.setDate(8, null);
                   stproc_stmt.registerOutParameter(1,Types.CHAR);
                   stproc_stmt.registerOutParameter(2,Types.DATE);
                   stproc_stmt.registerOutParameter(3,Types.CHAR);
                   stproc_stmt.registerOutParameter(4,Types.CHAR);
                   stproc_stmt.registerOutParameter(5,Types.CHAR);
                   stproc_stmt.registerOutParameter(6,Types.CHAR);
                   stproc_stmt.registerOutParameter(7,Types.DATE);
                   stproc_stmt.registerOutParameter(8,Types.DATE);
                   stproc_stmt.execute();
                   System.out.println("test "+stproc_stmt.getString(1));
                   ResultSet rs = stproc_stmt.executeQuery();
                  while (rs.next()){
                       System.out.println("result "+rs.getString("ACCPK"));
              } catch (SQLException e) {
                        e.printStackTrace();
         }And the stored procedure is
    CREATE OR REPLACE
    procedure Account_Summary (accpk in out char, incdt out date, bcur out char, bmark out char, tarTE out char, numHold out char, stDt out date, AsDt out date)
    is
    begin
    select account_pk, inception_date, base_currency, benchmark  into accpk, incdt, bcur, bmark
    from account a
    where a.Account_pk=accpk;
    select target_te, number_holdings, start_date, as_date into tarTE, numHold, StDt, AsDt
    from acc_summary asum
    where asum.account_pk=accpk;
    end Account_Summary;but it gives a exception ORA-01460: unimplemented or unreasonable conversion requested
    ORA-06512: at "REPRO.ACCOUNT_SUMMARY", line 4
    ORA-06512: at line 1
    i want to execute a stored procedure which has in , inout or out parameter
    but it can not work

    ========================
    In some contects varchar2 variable limit is 32512 characters... October 16, 2003
    Reviewer: Piotr Jarmuz from Poznan, Poland
    Interesting to note is the fact that varchar2 variables as parameters to stored
    procedures (in in/out out) may be "only" 32512 bytes long.
    I've checked this in Java and Perl. 32512 is the last value that works, for any
    bigger it throws:
    Exception in thread "main" java.sql.SQLException: ORA-01460: unimplemented or
    unreasonable conversion requested
    But in PL/SQL as you said 32767
    Regards,
    Piotr
    =================================
    This i got it from ask tom, well it make sense.... try checking your input with small numbers and strings
    Have fun

  • Procedure 'abc' expects parameter '@def', which was not supplied

    Hi ,
    I am doing a ABAP Proxy to PI to JDBC Stored Procedure synchronous scenario but getting an error as :
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'db.abc' (structure 'Statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Procedure 'abc' expects parameter '@def', which was not supplied.
    I have a element by name def in the data type.
    Any ideas why this error is coming up?
    Thanks,
    Anu

    use logsqlstatement in receiver JDBC, it will give you exact sql PI is firing on DB.
    using that you can adjust your DT structure to form the right sql.

  • How to call a procedure with SYS_REFCURSOR OUT parameter

    Hi,
    Using Oracle 11g R2.
    I'd like to know if it is possible to display the results of a SYS_REFCURSOR in a query. For example, if I had the following stored procedure
    create or replace procedure testprocedure (result OUT sys_refcursor)
    as
    begin
       open result for
          select 1 from dual
          union all
          select 2 from dual;
    end;
    I'd like to call this procedure similar to the way a query is called and executed. Like this
    select * from testprocedure
    I've seen plenty of examples on the web which show how it is possible to loop through results of a sys_refcursor inside of an anonymous block and display the results using dbms_output.putline, but this isn't the method I am looking for.

    I'd like to know if it is possible to display the results of a SYS_REFCURSOR in a query. For example, if I had the following stored procedure
    No - you can only use schema object types (SQL) in SQL queries and only then if you call a function.
    The function can return a SQL collection type or it can be a PIPELINED function whose return value is a SQL collection type. Either way your query will use the TABLE function and be of the form:
    select * from TABLE(testfunction);
    This is sample code for a PIPELINED function based on the SCOTT.EMP table. The function takes a department number parameter and returns the EMP rows for that department:
    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
    -- pipelined function
    create or replace function get_emp( p_deptno in number )
      return emp_table_type
      PIPELINED
      as
       TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
        emp_cv EmpCurTyp;
        l_rec  emp%rowtype;
      begin
        open emp_cv for select * from emp where deptno = p_deptno;
        loop
          fetch emp_cv into l_rec;
          exit when (emp_cv%notfound);
          pipe row( emp_scalar_type( l_rec.empno, LOWER(l_rec.ename),
              l_rec.job, l_rec.mgr, l_rec.hiredate, l_rec.sal, l_rec.comm, l_rec.deptno ) );
        end loop;
        return;
      end;
    select * from table(get_emp(20))

  • How to call a procedure which returns out parameter in form personalization

    Dear All,
    I have one procedure which is having 2 parameter in and one parameter out .
    The question is how to get the parameter out in from personalization in a local or global variable?
    Thanks

    Yes.
    You can use the "forms_ddl" builtin
    See the following examples. Make sure you include the single quotes as well as the = sign in the begining.
    See http://phenix.blog.163.com/blog/static/8397219320096213953151/
    http://oracle.anilpassi.com/forms-personalizations.html
    Sandeep Gandhi

  • Procedure or function 'sp_MSupd_dboItems' expects parameter '@bitmap', which was not supplied.

    Hello,
    when i view replication monitor  i get the following error:
    Procedure or function 'sp_MSupd_dboItems' expects parameter '@bitmap', which was not supplied. (Source: MSSQLServer, Error number: 201)
    also, in what database the stored procedure 'sp_MSupd_dboItems' found
    Can someone help with this error please

    I know I am very late to the party.. However, I would like to provide a solution to this problem.  I have seen this problem lately and I have fixed it.
    This problem occurs when you are replicating the data over to the same target database from multiple sources.
    Let me explain briefly with an example.
    I have a table namely 'vijay.dbo.test_vj' on ServerA and replicating it over to ServerC with the same schema as 'vijay.dbo.test_vj' at the target database.
    I have a table namely 'vijay.dbo.test_vj' on ServerB and replicating it over to ServerC with a different schema as 'vijay.srvrB.test_vj' at the target database.
    So, here in this case… the target database is same but the target tables are different (i.e., schema is different).  The problem here is that the replication stored procedures (sp_MSins*, sp_MSupd* & sp_MSdel*) that were created by default at the target
    database are being used for both the replications of 'srvrB' and 'dbo' schema tables.
    When you configure this type of replication, you should give custom names to the replication stored procedures (in the article properties) to allow the Replication to create the stored procedures separately for each table at the target database.
    You need to reconfigure one of those replications (either the one for ServerA to ServerC or the one for ServerB to ServerC)  by giving a separate names to the replication procedures.  
    This change will fix your problem.
    Regards, Vijay Pidikiti

  • Get more the one records  in  procedure by using out parameter

    Hi good evening every body,
    how to get more the one records in procedure by using out parameter ,
    give me one example of it.
    regards
    subba

    Like this ?
    SQL> set serverout on
    SQL> declare
      2    v_empno dbms_sql.Number_Table;
      3    v_ename dbms_sql.Varchar2_Table;
      4    PROCEDURE P1(p_in_deptno IN emp.deptno%TYPE,
      5                 p1_out OUT  dbms_sql.Number_Table,
      6                 p2_out OUT  dbms_sql.Varchar2_Table) IS
      7    BEGIN
      8      SELECT empno, ename BULK COLLECT
      9        INTO p1_out, p2_out
    10        FROM emp
    11       WHERE deptno = p_in_deptno;
    12    END;
    13  BEGIN
    14    P1(20, v_empno, v_ename);
    15    FOR i in 1 .. v_ename.COUNT LOOP
    16      dbms_output.put_line(v_empno(i) || '--' || v_ename(i));
    17    END LOOP;
    18  END;
    19  /
    7369--SMITH
    7566--JONES
    7788--SCOTT
    7876--ADAMS
    7902--FORD
    7941--ABCDEFGHIJKLMNOPQRSTUVWXYZAAAAAA
    7942--MY#@ ' "ABC
    PL/SQL procedure successfully completed.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Reg:execute procedure with in out parameters

    hi,
    what is the code to execute a procedure with in out parameters.can anyone give me an example
    thanks

    872296 wrote:
    thanks for the reply.
    i am very much new to oracle database.i need this code to put in one of my informatica mapping.
    so can you just elaborate what does 'karthick' mean?is it the name of the procedure.No, karthick is the value of the variable that is being passed into the procedure called "P" in karthicks example, then if that procedure changes the value inside, the variable will have that new value passed back out of the procedure to it.
    PROCEDURE prc_mv (name VARCHAR2)
    IS
    BEGIN
    dbms_mview.refresh (mv_name);
    END prc_mv;
    PROCEDURE refresh (response IN OUT NUMBER)
    IS
    BEGIN
    dbms_mview.refresh('mv1','C');
    dbms_mview.refresh('mv2','C');
    response := 1;
    EXCEPTION
    WHEN OTHERS
    THEN
    response := 0;
    END refresh;
    can you give the code for this procedure.Yes.
    DECLARE
      v_response NUMBER;
    BEGIN
      refresh(v_response);
    END;Though your code is awful. There's no point in having the response parameter as an IN OUT if you're not going to pass IN a value and use that in the code anywhere. In your case it only needs to be an OUT parameter because you're just passing back OUT a value. You are also masking any exceptions that happen by using a WHEN OTHERS clause.
    Better code would be something like...
    FUNCTION refresh (mv_name) RETURN NUMBER IS
      v_response NUMBER := 0; -- default response value
      e_mv_not_exist EXCEPTION; -- exception variable
      PRAGMA EXCEPTION_INIT(e_mv_not_exist, -23401); -- connect exception name to internal oracle error number
    BEGIN
      dbms_mview.refresh(mv_name,'C');
      v_response := 1;
    EXCEPTION
      WHEN e_mv_not_exist THEN -- handle specific expected exception
        -- if the materialized view does not exist, handle it gracefully as we don't want to stop
        response := 0;
    END refresh;
    declare
      v_response NUMBER;
    begin
      v_response := refresh('mv1');
      if v_response = 0 then
        -- the materialized view did not exist
      else
        -- the materialized view refreshed ok
      end if;
    end;where your exception handler explicity checks for expected exceptions such as :
    ORA-23401: materialized view "SCOTT"."FRED" does not exist... and any other exceptions that you're not expecting will be raised for you to see.
    It's also better as a function because you don't need to pass in a response value, you just want to get a response value back.
    There's rarely a good need to use OUT or IN OUT parameters. (there's some cases, but it's not something to consider doing as part of your regular design)

  • JDBC adapter Stored Procedure error: parameter was not supplied

    I am trying to call a Stored Procedure 'SP_FUSION_DEBMS_ADRC_MANAGE_CUSTOMER_ADDRESS' in our SQL Server database.
    XI 3.0 Sp13
    Jdbc Url: jdbc:microsoft:sqlserver://161.241.255.91:1433;databaseName=FusionDB;SelectMethod=Cursor
    I am getting following error:
    beging of error-----
    Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_FUSION_DEBMS_ADRC_MANAGE_CUSTOMER_ADDRESS' (structure 'Statement1'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Procedure 'SP_FUSION_DEBMS_ADRC_MANAGE_CUSTOMER_ADDRESS' expects parameter '@control_no', which was not supplied.
    End of error-----
    I have defined the field "control_no" in the interface defenition but I am not sure what causing this error, error message is mis-leading.
    Please let me know if you have any hints/comments?
    thanks,
    Laxman molugu

    Hi Laxman,
    maybe you have checked this already...from the following help link....DECIMAL might be something you might want to try out....
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    <i>action=EXECUTE
    Statements with this action result in a stored procedure being executed. The name of the element is interpreted as the name of the stored procedure in the database. If you use the optional <table> element, the value specified here is used as the stored procedure name. This enables you, for example, to define stored procedure names containing non-XML-compatible characters or characters that prevent them from being used in interface definitions in the Integration Builder/PCK.  If specified, <table> must be the first element in the block within <dbTableName>.
    The elements within the stored procedure are interpreted as parameters. They can optionally have the attribute isInput=“1“ (input parameter) or isOutput=“1“ (output parameter) or both (INOUT parameter). If both attributes are missing, the element is interpreted as an input parameter. The parameter names must be identical to those of the stored procedure definition.
    The attribute type=<SQL-Datatype> , which describes the valid SQL data type, is mandatory for all parameter types (IN, OUT, INOUT).
    The following SQL data types are supported:
    INTEGER, BIT, TINYINT, SMALLINT, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL, CHAR, VARCHAR, STRING, LONGVARCHAR, DATE, TIME, TIMESTAMP, BINARY, VARBINARY, LONGVARBINARY, BLOB (input and output),CLOB (input and output), CURSOR (output; only in conjunction with the Oracle JDBC driver).</i>

  • Problem with database adapter on plsql procedure with in/out parameters

    running BPEL 10.1.3.1 and using the database adapter on a plsql procedure with in/out parameters I get errors
    the plsql procedure:
    create or replace procedure proc_with_clob_inout_parameter(
    p_string in varchar2,
    p_clob in out clob)
    is
    begin
    p_clob := p_string;
    end proc_with_clob_inout_parameter;
    In BPEL I call this procedure. When I only assign a value to the p_string parameters (in a BPEL assign) all is well. When I also assign a value to the p_clob parameter the error occurs:
    <part name="summary">
    <summary>
    file:/ora1/app/oracle/as101.3/bpel/domains/digitaaldossier/tmp/.bpel_janb_inout_1.0_f6908ccf864581b7265c362444e88075.tmp/twee.wsdl
    [ twee_ptt::twee(InputParameters,OutputParameters) ] - WSIF JCA Execute of
    operation 'twee' failed due to: Error while trying to prepare and execute
    an API.
    An error occurred while preparing and executing the
    JANB.PROC_WITH_CLOB_PARAMETER2 API. Cause: java.sql.SQLException: Parameter
    Type Conflict [Caused by: Parameter Type Conflict]
    ; nested exception is:
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the
    JANB.PROC_WITH_CLOB_INOUT_PARAMETER API. Cause: java.sql.SQLException: Parameter
    Type Conflict [Caused by: Parameter Type Conflict]
    Check to ensure that the API is defined in the database and that the
    parameters match the signature of the API. Contact oracle support if error
    is not fixable.
    </summary>
    </part>
    In BPEL 10.1.2.0 this isn't a problem. I tested it against a 10.2.0.1 and a 10.2.0.2 database and in both situations I get the error with BPEL 10.1.3.1 and no error with BPEL 10.1.2.0
    it appears to be a problem in the database adapter...
    anyone with the same problems and/or a solution?

    Not of any use to you, but we had exactly the same problem on Friday when we applied AS 10.1.2.2 Patchset on top of BPEL 10.1.2.0.2.
    The clob in our pl/sql proc wan't declared as in/out but for some reasons JDeveloper had created a clob on the Output Parameter type in the db partner link xsd. I removed this and it worked. This code had been untouched , and working fine, for months.
    I'll be raising an SR today.
    Rob J

  • Calling Oracle procedure with two OUT parameters

    Hi I am having an Oracle procedure which return ref cursor. I also want to result one more out parameter result. How Can I call the procedure in SQL. Below is the way I am calling my stored procedure with one parameter.
    proc_Test (p_resultset=> My_cursor)
    How can I call the procedure when I have one more OUT parameter. Second parameter returns 0 or 1.
    Thanks in adv

    Yes its possible to use multiple parameter as OUT type in procedure.
    SQL>set serveroutput on size 1000000;
    SQL>CREATE OR REPLACE PROCEDURE myproc(p_cv OUT SYS_REFCURSOR, p_num OUT NUMBER) AS
      2  BEGIN
      3    OPEN p_cv FOR SELECT 'Hello Oracle' sayhello FROM DUAL ;
      4    p_num := 1;
      5  END;
      6  /
    Procedure created.
    SQL>VAR cv REFCURSOR;
    SQL>VAR num NUMBER;
    SQL>EXEC myproc(:cv, :num);
    PL/SQL procedure successfully completed.
    SQL>PRINT cv;
    SAYHELLO
    Hello Oracle
    SQL>PRINT num;
           NUM
             1
    SQL>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Toplink support for stored procedure with 2 OUT  REF CURSOR ?

    Can Toplink StoredProcedureCall be used with Oracle PLSql procedure with 2 OUT parameters. Parameter type is Ref Cursor (Oracle PLSQL resulset)
    Regards

    In a TopLink StoredProcedureCall using an OUT CURSOR the cursor is assumed to map to the result set for the TopLink query.
    For example if you had a stored procedure READ_ALL_EMP that returned a out cursor of EMP rows, you could use that procedure in a TopLink mapped Employee class mapped to the EMP table and use the stored procedure in a ReadAllQuery for the Employee class.
    If the procedure does not return data that maps to objects, you can use a DataReadQuery to access the data. The out cursor would be returned as a Vector of DatabaseRows that contain the data from the cursor rows.
    If the procedures data is complex and does not map to objects, it may be better to access the procedure directly through JDBC.

Maybe you are looking for

  • Photoshop CS6 will not open files

    Right after rebooting my computer (Windows 7 Pro) I can open one photo file in CS6 using any normal method of opening a file in Photoshop. After closing that file I cannot open any more files using any method such as>Open Recent, File>Open, or right

  • Using Labview with Java Applets

    I want to use LabView instruments in my Java Applets. Is it possible to call virtual instruments from applets?

  • Ipod photo freezes when using IM3 speakers

    I have a 60gb ipod photo that freezes up when I use it with my altec lansing IM3 speakers. Sometimes it will play for a couple of hours, other times it happens after only a few songs. It works fine after I reset it but it often freezes up again a lit

  • Suddenly got Bing toolbar that doesn't direct me to my regular homepage. How do I get rid of it?

    I just want to know how to get rid of a toolbar that doesn't seen to have a disable function.

  • FIXED ASSETS - USEFUL LIFE

    Hi, I´m modifying the useful life of some fixed assets and don´t have problems since it makes the amortization assessed since they are and it me re-calculates those who even remain. The problem is that they request that, in first foreseen, amortizati