Calling stored proc via services

I would be grateful if you could help me in resolving a technical issue in CMS(stellent).
We have a requirement that we need to call a stored procedure through services .The stored proc takes an input argument and returns a result set and has a defination that starts like
create or replace
PACKAGE BODY GETPROJECTPCKG IS
PROCEDURE PROC_RPU (rpu_list_count IN number, temp_project_cursor OUT project_ref_cursor) IS.
I've defined a service call like
<tr>
     <td>GET_RPU_INFO</td>
     <td>DocService
          33
          RECENTPROJECTUPDATE
          null
          null<br>
          null</td>
     <td>5:QgetRpuNames:temp_project_cursor::null</td>
</tr>
And below is how I've called the procedure
<tr>
     <td>QgetRpuNames</td>
     <td>{call GETPROJECTPCKG.PROC_RPU(?)}</td>
     <td>rpu_list_count int</td>
</tr>
i tried calling procedure as below also ..
<tr>
     <td>QgetRpuNames</td>
     <td>{call GETPROJECTPCKG.PROC_RPU(?,?)}</td>
     <td>rpu_list_count int
     temp_project_cursor out:resultset</td>
</tr>
As per my understanding the temp_project_cursor which is the resultset that would be returned from procedure should be available on the template specified.
But while executing the service I am getting an error :
Unable to create result set for query 'QgetRpuNames({call GETPROJECTPCKG.PROC_RPU(10)})'. ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PROC_RPU'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored)
Can you please assist.

Hey
if this is still an issue please refert "Call Stored Procedure from Oracle Fusion ECM (Stellent) " at http://www.corecontentonly.com/index.php/downloads/. Jason has shared a component that you can make use of.
cheers,
sapan

Similar Messages

  • Call stored proc problem (SQL exception)

    Hello
    I have a stored procedure with one param
    as follows:
    PROCEDURE test1 (xnrid IN VARCHAR2)
    This stored procedure is created in package known as "smart".
    I tried to call my stored proc via toplink as follows:
              UnitOfWork uow= dbSession.acquireUnitOfWork();
              StoredProcedureCall storedProcedureCall = new StoredProcedureCall();
              storedProcedureCall.setProcedureName("smart.test1");
              storedProcedureCall.addNamedArgument("xnrid");
              DataReadQuery query = new DataReadQuery();
              query.setCall(storedProcedureCall);
              Vector parameters = new Vector();
              //storedProcedureCall.setUsesBinding(true);
              /** For all input params **/
              query.addArgument("xnrid");
              parameters.add("ffff");
              /** execute query **/
              Object result = dbSession.executeQuery(query, parameters);
    And I have good oracle exception such as
    Internal Exception: java.sql.SQLException: ORA-00900: invalid SQL statement
    Error Code: 900
    Call:BEGIN smart.test1(xnrid=>'ffff'); END;
    Any help is appreciated
    gurcan

    Hi Sharon
    1. You said this code is written in the stored procedure.
    2. The scope of the temporary table is valid till its executer's session is valid.
    3. So if you execute the stored procedure and then try to find these temporary tables then you wont find them as the stored procedure has already finished its execution. And as soon as the execution of the stored procedure is over these temporary tables are automatically deleted.
    4. If you try to execute the code individually then it will show up untill you are logged on. And as your session is valid (Untill you are logged on), SQL Server will show up the tables.
    5. As a proof-of-concept:
    - Logon to SQL Server.
    - Create a temporary table.
    - Log off from SQL Server.
    - Log on again and try to find the temp table you created. It would not be there as it was valid only for your earlier session.
    Let me know if you have any further queries.
    Regards
    Nikhil

  • SQL Exception: Invalid column index while calling stored proc from CO.java

    Hello all,
    I am getting a "SQL Exception: Invalid column index" error while calling stored proc from CO.java
    # I am trying to call this proc from controller instead of AM
    # PL/SQL Proc has 4 IN params and 1 Out param.
    Code I am using is pasted below
    ==============================================
              OAApplicationModule am = (OAApplicationModule)oapagecontext.getApplicationModule(oawebbean);
    OADBTransaction txn = (OADBTransaction)am.getOADBTransaction();
    OracleCallableStatement cs = null;
    cs = (OracleCallableStatement)txn.createCallableStatement("begin MY_PACKAGE.SEND_EMAIL_ON_PASSWORD_CHANGE(:1, :2, :3, :4, :5); end;", 1);
         try
    cs.registerOutParameter(5, Types.VARCHAR, 0, 2000);
                        cs.setString(1, "[email protected]");
                             cs.setString(2, s10);
    //Debug
    System.out.println(s10);
                             cs.setString (3, "p_subject " );
                             cs.setString (4, "clob_html_message - WPTEST" );
                   outParamValue = cs.getString(1);
    cs.executeQuery();
    txn.commit();
    catch(SQLException ex)
    throw new OAException("SQL Exception: "+ex.getMessage());
    =========================================
    Can you help please.
    Thanks,
    Vinod

    You may refer below URL
    http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
    Thanks
    AJ

  • Calling 9iLite Stored Procs via ODBC from C/C++

    Hi all,
    The Oracle 9i Lite documentation seems to offer contradictory advice on calling stored procedures over ODBC using C/C++.
    Page 2-11 of Oracle9i Lite "Developer's Guide for Java" (pdf) states "Oracle Lite does not support the SQL CALL statement for invoking stored procedures". Page 2-23 of the same document states "to execute a stored procedure....use the following CALL statement".
    Does anyone know what the correct method is? CALL does not work for me, but I don't know if it's a coding error, or whether I need to invoke the SP a different way.
    thanks for any help you can give,
    Owen.

    Since Mr. Tamashunas's question began elsewhere, I'll give some background for others. Mr. Tamashunas has an ASP (using ADO) using the following code:
    Oracle Package / Proc:
    CREATE OR REPLACE PACKAGE BODY UserInfo
    AS
    PROCEDURE sp_getUsers (
    p_errcode out NUMBER,
    p_errdesc out VARCHAR2,
    iCurs in out tCurs)
    IS
    BEGIN
    p_errcode := 0;
    OPEN iCurs for Select * from naowner.users;
    EXCEPTION
    When others then
    p_errcode := SQLCODE;
    p_errdesc := SQLERRM;
    end sp_getUsers;
    END; -- package body
    ASP code:
    strConn = Session("dbConnStr")
    cnnOracle.Open strConn
    'Creates a command object.
    Set cmdPackage = Server.CreateObject("ADODB.Command")
    Set cmdPackage.ActiveConnection = cnnOracle
    cmdPackage.CommandType = adCmdStoredProc
    cmdPackage.CommandText = "UserInfo.sp_getUsers"
    'cmdStoredProc.CommandText = "{call UserInfo.sp_addUser(?,?,?,?)}"
    cmdStoredProc.Parameters.Append
    cmdStoredProc.CreateParameter("errcode",adInteger,adParamOutput)
    cmdStoredProc.Parameters.Append
    cmdStoredProc.CreateParameter("errdesc",adVarChar,adParamOutput,1000)
    cmdStoredProc.Execute
    ---------- or -----------------
    Session("dbConnStr") = "DSN=novoarch;UID=naowner;PWD=nadba"
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open Session("dbConnStr")
    set rs = objConn.execute("{call LogUtils.sp_getloginfo(:p_errcode, :p_errdesc,
    :iCurs)}")
    SQLBindParameter is an ODBC API call that allows you to bind parameters to procedure calls, rather than providing the parameters explicitly, i.e.
    {call foo( 1, 2, 'abc' )}
    vs
    {call foo( ?, ?, ? )}
    ADO is a higher-level interface to ODBC (or OLEDB). In ADO, you accomplish the same thing with the CreateParameter & Parameter.Append functions in your code.
    Justin Cave
    ODBC Development

  • Use 'default' keyword in call string while calling stored proc?

    I am calling following sql server stored procedure from java code using my jdbc driver for sql server: CREATE PROCEDURE test_findTbInfo (
    @paramIn_Str varchar(10),
    @paramOut_Int int OUT,
    @paramIn_Int int = 20
    AS
    begin
    set @paramOut_Int = @paramIn_Int * 100
    end
    If I make a call like this:
    CallableStatement cs = conn.prepareCall(" { call test_findTbInfo(? , , ? ) }");
    cs.setString(1, "test_tab");
    cs.setInt(2, 4);
    cs.execute();
    It works without any error. But this is not a right behavior. !! The second parameter as you see is passed like an optional parameter. But in stored proc it is NOT an optional param and so if the value not passed it should fail...
    Now if I change the code to
    CallableStatement cs = conn.prepareCall(" { call test_findTbInfo(? , default, ? ) }");
    it works correctly. Gives error that "Procedure 'test_findTbInfo' expects parameter '@paramOut_Int', which was not supplied." which is correct.
    So is it a normal practice to use 'default' keyword while calling sql server stored procedures having optional parameters in jdbc ????
    Anyone knows ??? As far as I know "call test_findTbInfo(? , , ? )" works fine except in some cases and also it forces users to put all optional parameters at the end of parameter list in stored proc.
    Please let me know whether I should go with 'default' throuout for sql server stored proc while calling using my jdbc driver.
    Amit

    {?= call <procedure-name>[<arg1>,<arg2>, ...]}The question mark in the above is the result parameter
    that must be registered.
    That is not the same as an OUT argument.Yes that is true. The result value and OUT parameters are different but they both MUST be registered as per jdbc API
    "The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get methods provided here."
    Anyway, my original question still stays as it was. If there are some optional IN parameters in stored procedure
    e.g.
    PROCEDURE test_findTbInfo (
    @paramIn_Int int = 20,
    @paramOut_Int int OUT
    how do you call this?
    CallableStatement cs = conn.prepareCall(" { call test_findTbInfo( , ? ) }");
    cs.registerOutParameter(1, Types.INTEGER);
    cs.execute();
    or
    CallableStatement cs = conn.prepareCall(" { call test_findTbInfo(default, ? ) }");
    Also note that I am intending to use ONLY sql server driver for this.
    The first as well second seem to work. Except that second way is seems reliable. I just wanted a second opinion on that...
    Amit

  • Problem Obtaining multiple results from MySql Stored Proc via JDBC

    I've spent alot of time on this and I'd be really grateful for anyones help please!
    I have written a java class to execute a MySQL stored procedure that does an UPDATE and then a SELECT. I want to handle the resultset from the SELECT AND get a count of the number of rows updated by the UPDATE. Even though several rows get updated by the stored proc, getUpdateCount() returns zero.
    It's like following the UPDATE with a SELECT causes the updatecount info to be lost. I tried it in reverse: SELECT first and UPDATE last and it works properly. I can get the resultset and the updatecount.
    My Stored Procedure:
    delimiter $$ CREATE PROCEDURE multiRS( IN drugId int, IN drugPrice decimal(8,2) ) BEGIN UPDATE drugs SET DRUG_PRICE = drugPrice WHERE DRUG_ID > drugId; SELECT DRUG_ID, DRUG_NAME, DRUG_PRICE FROM Drugs where DRUG_ID > 7 ORDER BY DRUG_ID ASC; END $$
    In my program (below) callablestatement.execute() returns TRUE even though the first thing I do in my stored proc is an UPDATE not a SELECT. Is this at odds with the JDBC 2 API? Shouldn't it return false since the first "result" returned is NOT a resultset but an updatecount? Does JDBC return any resultsets first by default, even if INSERTS, UPDATES happened in the stored proc before the SELECTs??
    Excerpt of my Java Class:
    // Create CallableStatement CallableStatement cs = con.prepareCall("CALL multiRS(?,?)"); // Register input parameters ........ // Execute the Stored Proc boolean getResultSetNow = cs.execute(); int updateCount = -1; System.out.println("getResultSetNow: " +getResultSetNow); while (true) { if (getResultSetNow) { ResultSet rs = cs.getResultSet(); while (rs.next()) { // fully process result set before calling getMoreResults() again! System.out.println(rs.getInt("DRUG_ID") +", "+rs.getString("DRUG_NAME") +", "+rs.getBigDecimal("DRUG_PRICE")); } rs.close(); } else { updateCount = cs.getUpdateCount(); if (updateCount != -1) { // it's a valid update count System.out.println("Reporting an update count of " +updateCount); } } if ((!getResultSetNow) && (updateCount == -1)) break; // done with loop, finished all the returns getResultSetNow = cs.getMoreResults(); }
    The output of running the program at command line:
    getResultSetNow: true 28, Apple, 127.00 35, Orange, 127.00 36, Bananna, 127.00 37, Berry, 127.00 Reporting an update count of 0
    During my testing I have noticed:
    1. According to the Java documentation execute() returns true if the first result is a ResultSet object; false if the first result is an update count or there is no result. In my java class callablestatement.execute() will return TRUE if in the stored proc the UPDATE is done first and then the SELECT last or vica versa.
    2. My java class (above) is coded to loop through all results returned from the stored proc in succession. Running this class shows that any resultsets are returned first and then update counts last regardless of the order in which they appear in the stored proc. Maybe there is nothing unusual here, it may be that Java is designed to return any Resultsets first by default even if they didn't happen first in the stored procedure?
    3. In my stored procedure, if the UPDATE happens last then callablestatement.getUpdateCount() will return the correct number of updated rows.
    4. If the UPDATE is followed by a SELECT (see above) then callablestatement.getUpdateCount() will return ZERO even though rows were updated.
    5. I tested it with the stored proc doing SELECT - UPDATE - SELECT and again getUpdateCount() returns ZERO.
    6. I tested it with the stored proc doing SELECT - UPDATE - SELECT - UPDATE and this time getUpdateCount() returns the number rows updated by the last UPDATE and not the first.
    My Setup:
    Mac OS X 10.3.9
    Java 1.4.2
    mysql database 5.0.19
    mysql-connector 5.1.10 (connector/J)
    Maybe I have exposed a bug in JDBC?
    Thanks for your help.

    plica10 wrote:
    Jschell thank you for your response.
    I certainly don't mean to be rude but I often get taken that way. I like to state facts as I see them. I'd love to be proved wrong because then I would understand why my code doesn't work!
    Doesn't matter to me if you are rude or not. Rudeness actually makes it more entertaining for me so that is a plus. Nothing I have seen suggests rudeness.
    In response to your post:
    When a MySql stored procedure has multiple sql statements such as SELECT and UPDATE these statements each produce what the Java API documentation refers to as 'results'. A Java class can cycle through these 'results' using callableStatement dot getMoreResults(), getResultSet() and getUpdateCount() to retrieve the resultset object produced by Select queries and updateCount produced by Inserts, Deletes and Updates.
    As I read your question it seems to me that you have already proven that it does not in fact do that?
    You don't have to read this but in case you think I'm mistaken, there is more detail in the following website under the heading 'Using the Method execute':
    http://docsrv.sco.com/JDK_guide/jdbc/getstart/statement.doc.html#1000107
    Sounds reasonable. But does not your example code prove that this is not what happens for the database and driver that you are using?
    Myself I dont trust update counts at all since, in my experience some databases do not return them. And per other reports sometimes they don't return the correct value either.
    So there are two possibilities - your code is wrong or the driver/database does not do it. For me I would also question whether in the future the driver/database would continue to behave the same if you did find some special way to write your SQL so it does do it. And of course you would also need to insure that every proc that needed this would be written in this special way. Hopefully not too many of those.
    So this functionality is built into java but is not in common use amongst programmers. My java class did successfully execute a stored proc which Selected from and then finally Updated a table. My code displayed the contents of the Select query and told me how many rows were affected by the update.
    It isn't "built into java". It isn't built into jdbc either. If it works at all then the driver and by proxy the database are responsible for it. I suspect that you would be hard pressed to find anything in the JDBC spec that requires what that particular link claims. I believe it is difficult to find anything that suggests that update counts in any form are required.
    So you are left with hoping that a particular driver does do it.
    I suppose it is rare that you would want to do things this way. Returning rowcounts in OUT parameters would be easier but I want my code to be modular enough to cover the situation where a statement may return more than one ResultSet object, more than one update count, or a combination of ResultSet objects and update counts. The sql may need to be generated dynamically, its statements may be unknown at compile time. For instance a user might have a form that allows them to build their own queries...
    Any time I see statements like that it usually makes me a bit uncomfortable. If I am creating data layers I either use an existing framework or I generate the code. For the latter there is no generalization of the usage. Every single operation is laid out in its own code.
    And I have in fact created generalized frameworks in the past before. I won't do it again. Benefits of the other idioms during maintenance are too obvious.

  • Calling stored proc (with 2 IN and 3 OUT) - from SQL Plus

    This is the signature of my stored proc:
    CREATE OR REPLACE PROCEDURE myschema.myproc
       p_usr_name     IN  VARCHAR2,    
       p_send_tmstmp  IN  DATE,    
       p_ret_value    OUT NUMBER,
       p_err_code     OUT VARCHAR2
    )If I need to call it from sql plus, how do I need to pass the arg?
    This is what I am doing
    execute myschema.myproc('abc123','02-MAY-2008');
    What is wrong here? If someone could help. Thx!

    Try something like this
    var usr_name    varchar2(30)  
    var send_tmstmp varchar2(11)  
    var ret_value   number
    var err_code    varchar2(10)
    begin
    :usr_name    := 'abc123';
    :usr_name := '02-MAY-2008';
    myschema.myproc ( p_usr_name           => :usr_name,
                      p_send_tmstmp        => TO_DATE( :usr_name, 'DD-MON-YYYY' ),
                      p_ret_value          => :ret_value,
                      p_err_code           => :err_code);
    end;
    print ret_value;
    print err_code;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Calling stored proc from java using ref cursor

    Hi All,
    We have a requirement to display all the records from a table on a JAVA screen. Due to some constraints, we have to write the query in the stored proc. We are trying to return a result set from the stored proc to the java code by using a ref cursor. Please refer to the code below.
    Following is the PL/SQL proc �
    procedure sp_user_course2(v1 OUT ref_cursor, persid in varchar2) as
    begin
    open v1 for
    SELECT lrn_exp_id, crs_name FROM emp_crs
    WHERE personid = persid;
    end;
    Here ref_cursor is of TYPE REF CURSOR declared in the package specification.
    The java code is �
    Callable stmt = conn.prepareCall("call sp_user_course2(?,?)");
    stmt.registerOutParameter(1,OracleTypes.CURSOR);
    stmt.setString(2,emplId);
    stmt.execute();
    OracleCallableStatement tstmt = (OracleCallableStatement) stmt;
    ResultSet rs = tstmt.getCursor (1);
    When I run the program, I get the following error (at stmt.execute()):
    [Oracle][ODBC][Ora]ORA-06553: PLS-306: wrong number or types of arguments in call to 'SP_USER_COURSE2' 6553
    Can anyone tell me what could be the problem with this code? I have read somewhere that REF CURSOR feature is available from Oracle 9i onwards. If so, then, is there any workaround for mapping REF CURSOR to Resultsets in Oracle 8i?

    These may help
    http://www.google.co.uk/search?q=jdbc+OracleTypes.CURSOR+tutorial

  • Calling stored proc from java to return ref cursor

    Hi All,
    We have a requirement to display all the records from a table on a JAVA screen. Due to some constraints, we have to write the query in the stored proc. We are trying to return a result set from the stored proc to the java code by using a ref cursor. Please refer to the code below.
    Following is the PL/SQL proc ?
    procedure sp_user_course2(v1 OUT ref_cursor, persid in varchar2) as
    begin
    open v1 for
    SELECT lrn_exp_id, crs_name FROM emp_crs
    WHERE personid = persid;
    end;
    Here ref_cursor is of TYPE REF CURSOR declared in the package specification.
    The java code is ?
    Callable stmt = conn.prepareCall("call sp_user_course2(?,?)");
    stmt.registerOutParameter(1,OracleTypes.CURSOR);
    stmt.setString(2,emplId);
    stmt.execute();
    OracleCallableStatement tstmt = (OracleCallableStatement) stmt;
    ResultSet rs = tstmt.getCursor (1);
    When I run the program, I get the following error (at stmt.execute()):
    [Oracle][ODBC][Ora]ORA-06553: PLS-306: wrong number or types of arguments in call to 'SP_USER_COURSE2' 6553
    Can anyone tell me what could be the problem with this code? I have read somewhere that REF CURSOR feature is available from Oracle 9i onwards. If so, then, is there any workaround for mapping REF CURSOR to Resultsets in Oracle 8i?

    These may help
    http://www.google.co.uk/search?q=jdbc+OracleTypes.CURSOR+tutorial

  • Calling Stored Proc from JDBC

    Hi All,
    I have a simple stored proc in SQL server 2000
    CREATE PROCEDURE dbo.sp_myProc
    AS
    SELECT CategoryID,CategoryName from Categories
    GO
    My java code is
    CallableStatement cs = connection.prepareCall("{? = call sp_myProc}");
    cs.registerOutParameter(1, Types.VARCHAR);
    boolean result = cs.execute();
    System.out.println("Result : "+result);
    ResultSet rs = (ResultSet)cs.getResultSet();
    while(rs.next())
    System.out.println(rs.getString("CategoryID"));
    When I execute this, the stored procedure gets executed succesfully i.e, the Result is true.
    But the resultset object : rs is Null. It returns a null pointer exception at rs.next();
    The table has values & this returns proper values in SQL analyzer.
    I use Microsoft JDBC drivers for SQL server.
    Is there anything I am doing wrong, all examples i saw refered to the same thing. I am struck with this any help would be appreciated.
    Thanks in advance,
    Sudhindra

    Sorry - small mistake here.
    The number of ? marks in the () brackets = the number of parameters in the procedure.
    Thus with your procedure nothing gets returned.
    With an Oracle Db you will declare the proc as follows:
    PROCEDURE abcd (par1 IN OUT VARCHAR2, par2 IN OUT VARCHAR2)
    IS
    BEGIN
    SELECT abc, def INTO par1, par2 FROM xyz;
    END;
    Thus you will register two in String parameters AND two out String parameters.
    If you require more than one record to be returned the you need to have a look at some collection type to be returned other than VARCHAR2.
    Andre

  • Calling stored procedure via java

    Hi all,
    i have a problem calling a stored procedure in my java code. I found an example at OTN which seems not to be correct. I know there had been a lot of posting regarding this isue but i did not find the solution.
    I had the following VB-code to translate to java:
    Set k = Server.CreateObject("ADODB.command")
    With k
    .activeconnection = Db
    .CommandType = 4
    .CommandText = "Get_SK"
    Set vret = .createparameter("vRet", 131, 2) 'Output
    .Parameters.append vret
    .Execute
    End With
    In my java code:
    CallableStatement sproc_stmt = null;
    try {
    sproc_stmt = lsession.connection().prepareCall("{ ? = call TCSDBOWNER.Get_SK}");
    sproc_stmt.registerOutParameter(1,OracleTypes.NUMERIC);
    sproc_stmt.setFetchSize(10);
    sproc_stmt.execute();
    The call generates an id for inserting new rows in the DB. executing the code shown above i got the following error:
    wrong number or types of parameter/arguments
    Is there anybody who can help me? Best regards,
    ak

    Hi again,
    this was really ugly:
    Re: Executing stored procedure via java
    Thanks all, regards,
    ak

  • Calling stored proc through JDBC

    Hello all,
    What I am doing is calling a stored proceedure in this manner...
    CallableStatement stmt = dbB.getConn().prepareCall ("call LDPKG.LDGetData(?, ?)");  //dbB is a conn Class I made, it works fine and getConn obviously jsut returns teh Connection object... Those work fine disreguard them.
    stmt.registerOutParameter(1, <IDONTKNOW>);  //I dont know the return type
    stmt.registerOutParameter(2, <IDONTKNOW>);  //I dont know the return type
    stmt.execute();I am unsure of what to put for the return type... The DB has these TYPES created as teh OUT for the stored Proc ...
    TYPE t_returnId is table of LDDATA.UserId%TYPE index by BINARY_INTEGER
    TYPE t_returnName is table of LDDATA.UserName%TYPE index by BINARY_INTEGER
    I dont know how to translate that return type to Java... Any ideas???
    Thanks!

    If you want the whole thing it is like this... I just didnt see the point in being redundant with the output types. Now that Date is an issue I brought it up. didnt think i needed to before.. sorry.
    OracleCallableStatement stmt = (OracleCallableStatement)dbB.getConn().prepareCall ("begin LDPKG.LDGetData(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); end;");
    stmt.registerIndexTableOutParameter(1,500, OracleTypes.NUMBER, 0);
    stmt.registerIndexTableOutParameter(2,500, OracleTypes.DATE, 0);
    stmt.registerIndexTableOutParameter(3,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(4,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(5,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(6,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(7,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(8,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(9,500, OracleTypes.NUMBER, 0);
    stmt.registerIndexTableOutParameter(10,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(11,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(12,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(13,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(14,500, OracleTypes.VARCHAR, 0);
    stmt.execute();I'm still looking through Google but not finding much about this :(.

  • Call stored proc from inside sp

    I am trying to call a stored proc from inside a stored proc and the stored proc needs to return a ref_cursor. I am trying to loop over the returned ref_cursor, but my problem is that when I compile the sp it says the ref_cursor is not a procedure or is undefined. Can anyone please tell me why I am getting this error? Refer to the code below!
    create or replace
    PROCEDURE TCS_GetPartReferenceData
    contracts IN VARCHAR2
    , showInWork IN INTEGER
    , userClock IN VARCHAR2
    , intMaxResults IN INTEGER
    , ret_cursor OUT SYS_REFCURSOR
    ) AS
    p_cursor SYS_REFCURSOR;
    BEGIN
    TCS_GETDRNSFORCONTRACTS(contracts
    , showinwork
    , userClock
    , intmaxresults
    , p_cursor);
    for r in p_cursor loop
    dbms_output.put_line(r.puid);
    end loop;
    END TCS_GetPartReferenceData;

    Probably you want sth. like
    CREATE OR REPLACE PROCEDURE tcs_getpartreferencedata (contracts       IN     VARCHAR2,
                                        showinwork      IN     INTEGER,
                                        userclock       IN     VARCHAR2,
                                        intmaxresults   IN     INTEGER,
                                        ret_cursor         OUT sys_refcursor)
    AS
    BEGIN
       tcs_getdrnsforcontracts (contracts,
                                showinwork,
                                userclock,
                                intmaxresults,
                                ret_cursor);
    END tcs_getpartreferencedata;
    var cur refcursor
    exec tcs_getpartreferencedata(contracts_value,showinwork_value,userclock_value,intmaxresults_value, :cur)
    print curfill in appropriate values for the parameters _value ....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can i call stored proc from VOImpl, not from AM?

    Hi,
    i know how to invoke proc from bb defined in AM...
    in VOImpl i have a method getSelectedRows()
    which gets me rows selected in table by user.
    how can i invoke stored proc from there?
    Edited by: grodno on Jan 31, 2013 3:35 AM

    Hi,
    its exactly the same code. The only missing link you have is the access to the transaction. In a Viewimpl file just call this.getApplicationModule() to get access to an application module.
    The method can also be exposed on a client interface (same as for AM)
    Frank

  • Call stored proc

    Hello!
    We use TT as CacheConnect to Oracle Database 10g. Can we call Oracle Database 10g stored proc from our C++ application? Than passthrough level we must to use if we can perform this call?
    Thank you!

    You can call Stored procedures using PassThrough=3 provided that the procedure does not return any values.
    Note that the procedure will execute in Oracle against Oracle data not against TimesTen data.
    Chris

Maybe you are looking for

  • [解決事例]IT 管理者は.どのユーザーが Creative Cloud ストレージ.サービスおよびアプリケーションにアクセスできるかをコントロールできますか?

    [回答内容] はい.IT 管理者は.カスタマイズしたデプロイメントパッケージ(業界標準の MSI および PKG ファイル)を無料の Creative Cloud Packager で作成することで. クリエイティブアプリケーションおよびアップデートのデプロイメントをコントロールできます. 新しい Adobe Enterprise Dashboard では.組織内のどのユーザーとグループがクラウドストレージおよびサービスにアクセスできるかを IT 管理者がコントロールできます.

  • Generic icons are displayed after visiting bookmarks instead of Favicons.

    1. I have done multiple searches over the past month trying to find a resolution to this issue without any success. Somewhere during the last two Firefox updates all of my bookmarks are now displaying the generic icon instead of the specific icon for

  • Merge rpd problem

    I tried merging 2 rpd. The merged rpd's query is not correct, even though it shows the same key, physical and logical joins correctly in the merged rpd, for eg. the following is modified as shown : original rpd query: +++Administrator:2b0000:2b0003:-

  • Where do my Pages files go when I sync my iPad?

    Hello. Please provide instructions on how to find a document that was originally created on the iPad Pages application, after that iPad has been synced with my iMac (desktop). Is there a particular file extension (like .doc for Word documents) for Pa

  • Non blocking socket

    I have an application that can act as a client or as a server. It connects as a client by default. If there is no existing server, an error is raised and the app reconnects as a server.If there is a server, the application will successfully connect a