How to call a (catalog) stored procedure directly in a xsodata file with in/output parameters

I am new to XS but i managed to enable a table through xsodata:
service namespace "sap.hana.democontent.epm" { 
  "AA465342"."TMP_HENK" as "TMP_HENK"; 
But now i am looking for code that can call a stored procedure that has 2 input- and 3 output parameters.... who can help me out with this?

Hi Vivek, thanks for the quick response!
I already found that blog, but it does not completely answer my question. i am struggling to get my content procedure working. call the R (catalog) stored procedure:
the code
/********* Begin Procedure Script ************/
BEGIN
    call "AA465342"."MO_PP_SENTIMENT"(SP_IN,SP_OUT) with overview;
END;
/********* End Procedure Script ************/
where it goes wrong:
: Only table variable is allowed in input parameter in a nested call
I have defined SP_IN and SP_OUT....
Can someone give me a clue what i have to change?

Similar Messages

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • How to call PL-SQL/stored procedure in Creator

    Anybody can tell how to call PL-SQL/Stored procedures inside creator...

    Hi!!!
    You can see this topic http://forum.sun.com/jive/thread.jspa?threadID=106046
    There is how to call oracle stored procedures. Also I put a lot of links in these topic doing reference stored procedures. I have one that it tells specially how to call oracle stored procedures from java, is in spanish but you can understand the code.;-)
    http://yoprogramador.vampisol.com/index.php?title=pl_sql_oracle_desde_java&more=1&c=1&tb=1&pb=1
    Byeee

  • How to call a sql stored procedure in java...... HELP

    Hi I am making an application for taking backup in sql automatically so i have created a dts package which is called by a stored procedure. Now the problem is that how to call that stored procedure in a Java program so that after running my java program i get my database backup.
    Please please solve my problem.
    thanks in advance.
    If possible please send the code.
    Message was edited by:
    Andy_Davis
    Message was edited by:
    Andy_Davis

    Hi... I am trying to create a dts package which is called by a stored procedure... How can i do this? IF possible can you please send me the code as well..
    Thanks a ton...
    Susan_Davis

  • How to call PL/SQL stored procedure using ODBC?

    Could anyone tell me how can I call PL/SQL stored procedure using
    ODBC? Are there any sample codes?
    Thanx!
    null

    You are correct on all counts, they all should work.
    Oracle Product Development Team wrote:
    : Hi,
    : I don't know the exact syntax in ODBC, but reasoning by analogy
    : with other API's, I'd bet one of the following works
    : (for a call to: procedure my_proc(n1 number, n2 number);):
    : "{ my_proc(1,2); }"
    : "{ call my_proc(1,2); }"
    : "{ begin my_proc(1,2); end }"
    : "begin my_proc(1,2); end;"
    : "begin my_proc(1,2); end"
    : Hope this helps. - Pierre
    : jiangbuf (guest) wrote:
    : : Could anyone tell me how can I call PL/SQL stored procedure
    : using
    : : ODBC? Are there any sample codes?
    : : Thanx!
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • How to call a Oracle Stored Procedure from Excel?

    Hi,
    I am new to Oracle database programming.I have an application in excel which has to update info in every row to the database.I am calling a stored procedure in excel for this.The stored procedure is as follows which is executing without a hitch in Oracle:
    CREATE OR REPLACE PROCEDURE APD_MASS_UPLOAD_UNITS
    (PRODUCT_ID VARCHAR2,Product_Code VARCHAR2, str_Adpt_Grp VARCHAR2,str_Adpt_Type VARCHAR2,
    str_PDC VARCHAR2,str_Release_ID VARCHAR2,str_Created_by VARCHAR2,
    str_Last_Updated_By VARCHAR2, dt_created_Date VARCHAR2,dt_Last_Updated_Date VARCHAR2,
    StrMonth1 VARCHAR2,strMth2 VARCHAR2,StrMth3 VARCHAR2,StrMth4 VARCHAR2,
    StrMth5 VARCHAR2,StrMth6 VARCHAR2,Sample Varchar2,str_message OUT Varchar2)
    AS
    type Month_type is table of VARCHAR2(10) index by binary_integer;
    str_month Month_Type;
    Fac_ID VARCHAR2(20);
    Org_ID VARCHAR2(20);
    Cnt_Units NUMBER;
    i_POS NUMBER;
    i_Month NUMBER;
    i_UNITS NUMBER;
    CURSOR C1 IS
    SELECT * FROM TBLLINE_ADOPT_PLAN WHERE SPEC_ID = Product_ID AND
    ADOPT_GROUP = str_Adpt_Grp AND ADOPT_TYPE = str_Adpt_Type
    AND RELEASE_ID = APD_Get_Release_ID(str_PDC,str_Release_Id);
    CURSOR C2 IS
    SELECT FACILITY_ID FROM TBLADOPT_GROUP_CSC WHERE ADOPT_GROUP = str_Adpt_Grp;
    CURSOR C3 IS
    SELECT ORG_ID FROM APD_DV_PRODUCT_V WHERE SPEC_ID = Product_ID;
    CURSOR C4 IS
    SELECT * FROM TBLPROD_CSC WHERE PROD_SPEC_ID = Product_ID;
    Adopt_Rec C1%ROWTYPE;
    Fac_Rec C2%ROWTYPE;
    PMORG_REC C3%ROWTYPE;
    CSC_Rec C4%ROWTYPE;
    i_Count NUMBER;
    Message VARCHAR2(20);
    BEGIN
    Message := APD_SPECID_VALIDATE(Product_ID,Product_code,Str_PDC, str_Release_ID);
    IF TRIM(Message) is null then
    OPEN C1;
    FETCH C1 INTO Adopt_Rec;
    IF C1%NOTFOUND THEN
    INSERT INTO TBLLINE_ADOPT_PLAN (SPEC_ID,ADOPT_GROUP, ADOPT_TYPE,RELEASE_ID, SAMPLES,CREATED_BY,CREATED_DATE, LAST_UPDATED_BY,LAST_UPDATED_DATE,SAMPLE_ONLY_IND, GRID_TYPE_CD) VALUES
    (Product_ID,str_Adpt_Grp ,str_Adpt_Type,
    APD_Get_Release_ID(str_PDC,str_Release_Id), 0,str_Created_By,
    TO_DATE(dt_Created_Date,'DD/MM/YYYY'),str_Last_Updated_By,
    TO_DATE(dt_Last_Updated_Date,'DD/MM/YYYY'),'N','C');
    END IF;
    CLOSE C1;
    str_Month(1) := strMonth1;
    str_Month(2) := strMth2;
    str_Month(3) := strMth3;
    str_Month(4) := strMth4;
    str_Month(5) := strMth5;
    str_Month(6) := strMth6;
    OPEN C2;
    FETCH C2 INTO Fac_REC;
    Fac_ID := Fac_Rec.FACILITY_ID;
    CLOSE C2;
    OPEN C3;
    FETCH C3 INTO PMORG_Rec;
    Org_ID := PMORG_Rec.Org_ID;
    CLOSE C3;
    OPEN C4;
    FETCH C4 INTO CSC_Rec;
    IF C4%NOTFOUND THEN
    INSERT INTO TBLPROD_CSC(PROD_SPEC_ID,CSC_FACILITY_ID, PROFIT_CENTER_CD,DEFAULT_IND, CREATED_BY, CREATED_DATE, LAST_UPDATED_BY, LAST_UPDATED_DATE) VALUES
    (Product_ID , Fac_ID,Org_id, 'N', str_Created_by ,
    To_date ( dt_Created_Date,'DD/MM/YYYY') ,str_Last_updated_by ,
    To_Date (dt_Last_Updated_Date ,'DD/MM/YYYY'));
    END IF;
    CLOSE C4;
    IF Sample > 0 Then
    UPDATE TBLLINE_ADOPT_PLAN
    SET SAMPLES = Sample
    WHERE SPEC_ID = Product_ID AND
    ADOPT_GROUP = str_adpt_grp AND
    ADOPT_TYPE = str_Adpt_Type AND
    RELEASE_ID = APD_Get_Release_ID(str_PDC,str_Release_Id);
    END IF;
    str_Message := 'Updated';
    END IF;
    END;
    The code to call the stored procedure in Excel is as follows:
    Dim Conn As New ADODB.Connection
    Dim InputParam1 As New ADODB.Parameter
    Dim InputParam2 As New ADODB.Parameter
    Dim InputParam3 As New ADODB.Parameter
    Dim InputParam4 As New ADODB.Parameter
    Dim InputParam5 As New ADODB.Parameter
    Dim InputParam6 As New ADODB.Parameter
    Dim InputParam7 As New ADODB.Parameter
    Dim InputParam8 As New ADODB.Parameter
    Dim InputParam9 As New ADODB.Parameter
    Dim InputParam10 As New ADODB.Parameter
    Dim InputParam11 As New ADODB.Parameter
    Dim InputParam12 As New ADODB.Parameter
    Dim InputParam13 As New ADODB.Parameter
    Dim InputParam14 As New ADODB.Parameter
    Dim InputParam15 As New ADODB.Parameter
    Dim InputParam16 As New ADODB.Parameter
    Dim InputParam17 As New ADODB.Parameter
    Dim InputParam18 As New ADODB.Parameter
    Dim OutputParam As New ADODB.Parameter
    Dim Mth1, Mth2, Mth3, Mth4, Mth5, Mth6 As String
    Dim Rs_data As New ADODB.Recordset
    Conn.ConnectionString = ("Provider=MSDAORA.1;User ID=" & "cnbg" & ";PASSWORD=" & "cnbg" & ";Data Source=" & "DAQ01" & ";Persist Security Info=False")
    Conn.Open
    OraCmd.ActiveConnection = Conn
    OraCmd.CommandText = "APD_MASS_UPLOAD_UNITS"
    OraCmd.CommandType = adCmdStoredProc
    Conn.CursorLocation = adUseClient
    OraCmd.Parameters.Refresh
    Set InputParam1 = OraCmd.CreateParameter("Product_ID", adVarChar, adParamInput, 20)
    InputParam1.Value = spec_id
    Set InputParam2 = OraCmd.CreateParameter("Product_code", adVarChar, adParamInput, 20)
    InputParam2.Value = str_product_code
    Set InputParam3 = OraCmd.CreateParameter("str_Adpt_Type", adVarChar, adParamInput, 10)
    InputParam3.Value = Adopt_Group
    Set InputParam4 = OraCmd.CreateParameter("str_Adpt_Type", adVarChar, adParamInput, 10)
    InputParam4.Value = Adopt_Type
    Set InputParam5 = OraCmd.CreateParameter("str_pdc", adVarChar, adParamInput, 10)
    InputParam5.Value = ThisWorkbook.strDbPDC
    Set InputParam6 = OraCmd.CreateParameter("str_Release_ID", adVarChar, adParamInput, 10)
    InputParam6.Value = str_Release_Id
    Set InputParam7 = OraCmd.CreateParameter("str_created_by", adVarChar, adParamInput, 10)
    InputParam7.Value = ThisWorkbook.User_Name
    Set InputParam8 = OraCmd.CreateParameter("str_last_updated_by", adVarChar, adParamInput, 10)
    InputParam8.Value = ThisWorkbook.User_Name
    Set InputParam9 = OraCmd.CreateParameter("dt_created_date", adVarChar, adParamInput, 10)
    InputParam9.Value = Sheet1.Cells(8, 2)
    Set InputParam10 = OraCmd.CreateParameter("dt_Last_Updated_Date", adVarChar, adParamInput, 10)
    InputParam10.Value = Sheet1.Cells(8, 2)
    Set InputParam11 = OraCmd.CreateParameter("strMonth1", adVarChar, adParamInput, 10)
    InputParam11.Value = Mth1
    Set InputParam12 = OraCmd.CreateParameter("strMth2", adVarChar, adParamInput, 10)
    InputParam12.Value = Mth2
    Set InputParam13 = OraCmd.CreateParameter("strMth3", adVarChar, adParamInput, 10)
    InputParam13.Value = Mth3
    Set InputParam14 = OraCmd.CreateParameter("strMth4", adVarChar, adParamInput, 10)
    InputParam14.Value = Mth4
    Set InputParam15 = OraCmd.CreateParameter("strMth5", adVarChar, adParamInput, 10)
    InputParam15.Value = Mth5
    Set InputParam16 = OraCmd.CreateParameter("strMth6", adVarChar, adParamInput, 10)
    InputParam16.Value = Mth6
    Set InputParam17 = OraCmd.CreateParameter("Sample", adInteger, adParamInput, 10)
    InputParam17.Value = 0
    Set InputParam18 = OraCmd.CreateParameter("str_message", adVarChar, adParamOutput, 10)
    OraCmd.Parameters.Append InputParam1
    OraCmd.Parameters.Append InputParam2
    OraCmd.Parameters.Append InputParam3
    OraCmd.Parameters.Append InputParam4
    OraCmd.Parameters.Append InputParam5
    OraCmd.Parameters.Append InputParam6
    OraCmd.Parameters.Append InputParam7
    OraCmd.Parameters.Append InputParam8
    OraCmd.Parameters.Append InputParam9
    OraCmd.Parameters.Append InputParam10
    OraCmd.Parameters.Append InputParam11
    OraCmd.Parameters.Append InputParam12
    OraCmd.Parameters.Append InputParam13
    OraCmd.Parameters.Append InputParam14
    OraCmd.Parameters.Append InputParam15
    OraCmd.Parameters.Append InputParam16
    OraCmd.Parameters.Append InputParam17
    OraCmd.Parameters.Append InputParam18
    Set Rs_data = New ADODB.Recordset
    Set Rs_data = OraCmd.Execute
    I am getting an error at this point which
    ORA-06550:line 1,column 54:
    PLS-00103:Encountered the symbol ">" when expecting one of the following:
    . ( ) * @ % & = - + < / > at in is mod not rem
    <an exponent(**)> <> or != or ~= or >= <= <> and or like
    between ||
    Can anyone pls help me?Thanks.

    You do not need to code an explicit cursor for a single fetch. An implicit cursor is less code to write, read, maintain and execute.
    E.g. Instead of all this:
    CURSOR C2 IS
    SELECT FACILITY_ID FROM TBLADOPT_GROUP_CSC WHERE ADOPT_GROUP = str_Adpt_Grp;
    OPEN C2;
    FETCH C2 INTO Fac_REC;
    Fac_ID := Fac_Rec.FACILITY_ID;
    CLOSE C2;
    Simply code this:SELECT
    Fac_Rec.FACILITY_ID INTO Fac_ID
    FROM BLADOPT_GROUP_CSC
    WHERE ADOPT_GROUP = str_Adpt_Grp;PL/SQL procedure calls have to be made (to Oracle) as anonymous PL/SQL blocks. This means that you need to wrap the procedure call into BEGIN..END tags.
    So instead of coding this:
    OraCmd.CommandText = "APD_MASS_UPLOAD_UNITS"
    You need to code something like:
    OraCmd.CommandText = "BEGIN APD_MASS_UPLOAD_UNITS; END;"
    However, this will not work as APD_MASS_UPLOAD_UNITS expects a bunch of input parameters. And you're on the right track about attempting to bind your Excel variables' values to the PL/SQL procedure's parameters.
    Unsure how ADO works, but typically you can bind by name or by position. Let's assume bind by position (typically in PHP):
    OraCmd.CommandText = "BEGIN APD_MASS_UPLOAD_UNITS( ?, ?, ?, ?, ?. ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); END;"
    Then you will bind values to positions 1 to 18 (did I count the number of params right?). Something like:
    OraCmd.CreateParameterByPosition( 1, adVarChar, adParamInput, 20)
    Or you can bind by name. E.g.
    OraCmd.CommandText = "BEGIN APD_MASS_UPLOAD_UNITS( :pid, :pcode, ..etc.. ); END;"
    And:
    OraCmd.CreateParameterByName( 'pid', adVarChar, adParamInput, 20)
    Read up on your OraCmd.CreateParameter() to see how to correctly use it.
    A few more comments. 18 parameters in a call is something I would seriously reconsider. It is quite easy to get it wrong - transpose two parameters. It is very difficult to read and check. Very difficult to maintain. It is much safer to rather define a %ROWTYPE structure to pass, or a PL/SQL record structure.
    You are passing date values as VARCHAR2. Rather pass the parameter as the correct data type. E.g.
    create or replace procedure foo( custID number, invoiceDate date )...
    And then when you call it (in your client code), you specify the date string and date format and make it into a date. E.g.
    OraCmd.CommandText = "begin foo( :myCust, TO_DATE(:myDateString,:myDateFormat) ); end;"

  • How to call PL/SQL stored procedure with TWO or more arguments from URL?

    Hi all,
    does anybody know, how to call stored procedure with more than one argument?
    How to do this with one argument is known -
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#" width="70" height="80" alt="No Picture">
    But if I need to call procedure with two formal parameters? And need to pass through URL, for example, two page item values?

    Just separate with an "&". Using your previous example, I'll add i_name and i_type:
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#&i_name=somename&i_type=jpg" width="70" height="80" alt="No Picture" />
    Tyler

  • How to call pl sql stored procedure or function in OAF 10 plus versions

    Hello All,
    I am using J-dev 10.1.3.3.0.3 version.I want to call stored procedure from package in one of my controller. I tried using "txn.createCallableStatement" but it is saying that createcallablemethod is not available.Does any one knows about this.
    Thanks

    Try the OA Framework Forum.
    John

  • How to create stored procedure directely in RPD

    Hi Gurus,
    I am trying to create stored procedure directly in physical table in rpd level in OBIEE.for this one i have gone through below website.
    http://obiee101.blogspot.com/2011/01/obiee-using-mssql-stored-procedure-as.html
    in that blog they mentioned to write some query which is...........
    EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME]
    in above query i am not getting what is DATABASE_NAME,SCHEMA_NAME,PROCEDURE_NAME
    can any one elobrate this one

    Hi nath,
    Firstly are you using MYSQL or Oracle as the database,if its oracle database then follow this
    http://obiee101.blogspot.com/2008/01/obiee-using-oracle-stored-procedure-to.html
    http://oraclebizint.wordpress.com/2008/02/20/oracle-bi-ee-101332-executing-stored-proceduresfunctions-before-reports-before-report-triggers-and-global-temporary-tables/
    EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME][DATABASE_NAME] --> is the database name your creating your procedure
    [SCHEMA_NAME]-->is the user with which your creating
    [PROCEDURE_NAME] --> the name given to procedure
    You dont know how to get those run this SQL in TOAD and see select sys_context('userenv','db_name'), sys_context('userenv','session_user') from dual
    (OR) open you connection pool properties window in RPD,you will get the DB name and the user name as the schema name
    hope answered your question.
    CHeers,
    KK

  • How do I call a DB2 Stored procedure?

    I am having problems trying to call a DB2 stored procedure.
    I am using the Service: Foundation -> JDBC 1.0 -> Call Stored Procedure.
    Stored procedure I am calling is (with 4 input params):
    CALL DB2D.SYSPROC.REGC1389(?, ?, ?, ?,
    {$ /process_data/@Name_Full $},
    {$ /process_data/@Name_Title $},
    {$ /process_data/@Name_Last $},
    {$ /process_data/@Name_Middle $},
    {$ /process_data/@Name_First $},
    {$ /process_data/@Name_Suffix $},
    {$ /process_data/@Address_1 $},
    {$ /process_data/@Address_2 $},
    {$ /process_data/@Address_3 $},
    {$ /process_data/@Address_City $},
    {$ /process_data/@Address_State $},
    {$ /process_data/@Address_Zip $},
    {$ /process_data/@ex_Code $},
    {$ /process_data/@Birthdate $},
    {$ /process_data/@ID_TypeCode_1 $},
    {$ /process_data/@ID_Number_1 $},
    {$ /process_data/@ID_TypeCode_2 $},
    {$ /process_data/@ID_Number_2 $},
    {$ /process_data/@ID_TypeCode_5 $},
    {$ /process_data/@ID_Number_5 $},
    {$ /process_data/@ID_TypeCode_6 $},
    {$ /process_data/@ID_Number_6 $},
    {$ /process_data/@ID_TypeCode_7 $},
    {$ /process_data/@ID_Number_7 $},
    {$ /process_data/@ID_TypeCode_8 $},
    {$ /process_data/@ID_Number_8 $},
    {$ /process_data/@ID_TypeCode_9 $},
    {$ /process_data/@ID_Number_9 $},
    {$ /process_data/@ID_TypeCode_10 $},
    {$ /process_data/@ID_Number_10 $},
    {$ /process_data/@ID_TypeCode_11 $},
    {$ /process_data/@ID_Number_11 $},
    {$ /process_data/@ID_TypeCode_12 $},
    {$ /process_data/@ID_Number_12 $},
    {$ /process_data/@ID_TypeCode_13 $},
    {$ /process_data/@ID_Number_13 $},
    {$ /process_data/@ID_TypeCode_14 $},
    {$ /process_data/@ID_Number_14 $},
    {$ /process_data/@ID_TypeCode_15 $},
    {$ /process_data/@ID_Number_15 $},
    {$ /process_data/@ID_TypeCode_16 $},
    {$ /process_data/@ID_Number_16 $},
    {$ /process_data/@ID_TypeCode_17 $},
    {$ /process_data/@ID_Number_17 $},
    {$ /process_data/@ID_TypeCode_18 $},
    {$ /process_data/@ID_Number_18 $},
    {$ /process_data/@Return_Code $},
    {$ /process_data/@SQL_RTNC $},
    {$ /process_data/@SQL_StateCode $},
    {$ /process_data/@SQL_Errmsg $});
    (I can call this same stored proc in ColdFusion, so the procedure does work.)
    The error message I get when I invoke it is:
    =======================================
    ALC-DSC-005-000: com.adobe.idp.dsc.DSCNotSerializableException: Not Serializable
    Caused by: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker. java:367)
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:157)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:342)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doRequiresNew (EjbTransactionCMTAdapterBean.java:284)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionCMTAdapter_ caf58c4f.doRequiresNew(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:143)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:102)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(AbstractMessageReceiv er.java:315)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeCall(SoapSdkEndpoint. java:138)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke(SoapSdkEndpoint.java :81)
    at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1096)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1037)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
    at com.adobe.idp.dsc.provider.impl.soap.axis.InvocationFilter.doFilter(InvocationFilter.java :43)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:566)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.jav a:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink .java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink .java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConn ectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitia lReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionLi stener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    Caused by: java.lang.RuntimeException: String Literal support for procedure calls to DB2/390 is disabled.  Failing SQL text CALL DB2D.SYSPROC.REGC1389(?, ?, ?, ?,
    at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:837)
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker. java:346)
    ... 66 more
    Caused by: java.lang.RuntimeException: String Literal support for procedure calls to DB2/390 is disabled.  Failing SQL text CALL DB2D.SYSPROC.REGC1389(?, ?, ?, ?,
    at com.adobe.idp.dsc.jdbc.helper.StoredProcedureHelper.callStoredProcedure(StoredProcedureHe lper.java:115)
    at com.adobe.idp.dsc.jdbc.JDBCService.callStoredProcedure(JDBCService.java:660)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doBMT(EjbTran sactionBMTAdapterBean.java:197)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doBMT(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:95)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:132)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:724)
    ... 67 more
    Caused by: com.ibm.db2.jcc.c.SqlException: String Literal support for procedure calls to DB2/390 is disabled.  Failing SQL text CALL DB2D.SYSPROC.REGC1389(?, ?, ?, ?,
    at com.ibm.db2.jcc.c.ig.i(ig.java:2531)
    at com.ibm.db2.jcc.c.jg.b(jg.java:292)
    at com.ibm.db2.jcc.c.jg.<init>(jg.java:263)
    at com.ibm.db2.jcc.c.kg.<init>(kg.java:72)
    at com.ibm.db2.jcc.a.fc.<init>(fc.java:91)
    at com.ibm.db2.jcc.a.b.b(b.java:1959)
    at com.ibm.db2.jcc.c.p.a(p.java:2317)
    at com.ibm.db2.jcc.c.p.prepareCall(p.java:1909)
    at com.ibm.db2.jcc.c.nc.prepareCall(nc.java:246)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.pmiPrepareCall(WSJdbcConnection.java:1832)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCall(WSJdbcConnection.java:1959)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCall(WSJdbcConnection.java:1914)
    at com.adobe.idp.dsc.jdbc.helper.StoredProcedureHelper.callStoredProcedure(StoredProcedureHe lper.java:105)
    ... 96 more
    at com.adobe.idp.dsc.provider.impl.base.AbstractResponseHolder.handleException(AbstractRespo nseHolder.java:136)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkBindingStubUtil.deSerializeResponse( SoapSdkBindingStubUtil.java:122)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:128)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.common.utils.invoke.InvokeWithProgressRunner.invokeServiceOperation(InvokeWithP rogressRunner.java:170)
    at com.adobe.common.utils.invoke.InvokeWithProgressRunner.run(InvokeWithProgressRunner.java: 97)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    =======================================
    I am using the JDBC Provider: DB2 Universal JDBC Provider
    Implementation class name : com.ibm.db2.jcc.DB2ConnectionPoolDataSource
    For the Data source : DB2D
    Data store helper class name:Data store helper classes provided by WebSphere Application Server
    This is my first attempt at calling a DB2 stored procedure, so any tips on how to make it work would be appreciated.
    Thanks
    Jim

    Jasmin,
    Thanks for the "db2.jcc.supportZosSpLiterals=yes" configuration property suggestion.
    I worked with our WebSphere support team to set this property.  We set it as a Custom Property in the data source.
    The DB2 driver version is higher then the APAR which supports this property, but it doesn't seem to recognize it.
    [8/28/09 11:15:42:775 CDT] 0000003f DSConfigurati W DSRA8200W: DataSource Configuration: DSRA8020E: Warning: The property 'supportZosSpLiterals' does not exist on the DataSource class com.ibm.db2.jcc.DB2ConnectionPoolDataSource.
    [8/28/09 11:15:43:337 CDT] 0000003f InternalDB2Un I DSRA8203I: Database product name : DB2
    [8/28/09 11:15:43:353 CDT] 0000003f InternalDB2Un I DSRA8204I: Database product version : DSN08015
    [8/28/09 11:15:43:353 CDT] 0000003f InternalDB2Un I DSRA8205I: JDBC driver name : IBM DB2 JDBC Universal Driver Architecture
    [8/28/09 11:15:43:353 CDT] 0000003f InternalDB2Un I DSRA8206I: JDBC driver version : 2.11.24
    [8/28/09 11:15:43:369 CDT] 0000003f InternalDB2Un I DSRA8212I: DataStoreHelper name is: [email protected]
    [8/28/09 11:15:43:384 CDT] 0000003f WSRdbDataSour I DSRA8208I: JDBC driver type : 4
    Are we setting the property in the right place?  What version of the DB2 driver is needed for this property?  Any other tips?
    Thanks
    Jim

  • How to retrive a STANDARD stored procedure with java?

    I have searched and searched, I have not found a direct, CLEAR, answer to this.
    how do you call a standard, (not java) stored procedure from oracle database that requires input variables?
    I have looked, searched and read and cannot find one simple example code, or message that explains this in clear concise info.
    can some one please send me a email on this:
    [email protected]
    Don't bother leaving a message here, once I save this message and come back a day later its gone and can't be found by me..

    Hi... I am trying to create a dts package which is called by a stored procedure... How can i do this? IF possible can you please send me the code as well..
    Thanks a ton...
    Susan_Davis

  • SQLException: Cursor is closed while calling a java stored procedure

    Hi,
    I got the following error when trying to read from a cursor of a java stored procedure:
    java.sql.SQLException: Cursor is closed
    The java procedure is stored in the database and wrapped by a sql call. Then another java class executes the sql call.
    The stored procedure looks like this:
    import java.io.Reader; import java.security.MessageDigest; import java.sql.*; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import oracle.jdbc.OracleCallableStatement; import oracle.jdbc.OracleConnection; public class test { static Connection conn = null; static String username = null; static String password = null; static Integer userid  = null; public static void main(String args[]) throws Exception {     username = "keller";     password = "945435";     login(username, password); }       public static String login(String in_username, String in_password) {     String access = null;     String password = null;         try {             DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());  // Non OracleVM             System.out.print("Verbindung wird initialisiert... ");             conn =         //DriverManager.getConnection("jdbc:default:connection:");           //conn.setAutoCommit(false);             DriverManager.getConnection("jdbc:oracle:thin:@[...]:1521:[...]","[...]","[...]");             System.out.println("OK");                         System.out.print("Logindaten werden ueberprueft... ");             String sql = "SELECT matrikelnr, password FROM student WHERE name = ?";             PreparedStatement pstmt = conn.prepareStatement(sql);             pstmt.setString(1, in_username);             ResultSet rset = pstmt.executeQuery();             while (rset.next())             {             userid = rset.getInt(1);                 password = rset.getString(2);             }             access = "student";                         pstmt = conn.prepareStatement(sql);             if (password == null) {             sql = "SELECT dozentnr, password FROM dozent WHERE name = ?";                 pstmt = conn.prepareStatement(sql);                 pstmt.setString(1, in_username);                 rset = pstmt.executeQuery();                 while (rset.next())                 {             userid = rset.getInt(1);                     password = rset.getString(2);                                     }                 pstmt = conn.prepareStatement(sql);                 if (password == null) {                   throw new SQLException("User nicht gefunden!");                 }                 access = "dozent";             }             //rset.close(); // Resultset schließen             //pstmt.close(); // Statement schließen                         // MD5 Hash vergleichen             MessageDigest md5 = MessageDigest.getInstance("MD5");             md5.reset();             md5.update(in_password.getBytes());             byte[] result = md5.digest();             StringBuffer hexString = new StringBuffer();             for (int i=0; i<result.length; i++) {               if(result[i] <= 15 && result[i] >= 0){                 hexString.append("0");               }               hexString.append(Integer.toHexString(0xFF & result));
    if (password != null) {
    if (password.equals(hexString.toString())) {
    System.out.println("OK");
    } else {
    throw new Exception("Falsches Passwort!");
    catch(SQLException e) {
    System.err.println("SQL Fehler!");
    System.err.println(e.getMessage());
    catch(Exception e) {
    System.err.println("Fehler!");
    System.err.println(e.getMessage());
    return access;
    public static void getLeistungsschein(int matrikelnr, ResultSet[] rout)
    ResultSet rs = null;
    try
    System.out.print("Berechtigung ueberpruefen... ");
    if (userid != matrikelnr)
    throw new Exception("Zugriff verweigert, keine Berechtigung!");
    int mnr = matrikelnr;
    ((OracleConnection)conn).setCreateStatementAsRefCursor(true);
    PreparedStatement ps = conn.prepareStatement("select bezeichnung, note from klausur inner join leistungsschein on klausur.KLAUSURNR=leistungsschein.KLAUSURNR where matrikelnr= ?");
    ps.setInt(1, mnr);
    rs = (ResultSet)ps.executeQuery();
    rout[0]= rs;
    catch(SQLException e) {
    System.err.println("Fehler!");
    System.err.println(e.getMessage());
    catch(Exception e) {
    System.err.println("Fehler!");
    System.err.println(e.getMessage());
    The sql call:
    create or replace
    procedure pgetleistungsschein(matrikelnr in number, cur OUT refcurpkg.refcur_t) is
    language java name 'Klausurverwaltung.getLeistungsschein(int, java.sql.ResultSet[])';
    And finally the wrapper is called by another java programm, see this:
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.List;
    import oracle.jdbc.OracleCallableStatement;
    import oracle.jdbc.OracleResultSet;
    import oracle.jdbc.OracleTypes;
    public class cursortest {
    public static void main(String[] args) {
    try{
    //-- Oracle Treiber laden
    Class.forName( "oracle.jdbc.driver.OracleDriver" );
    Connection c = DriverManager.getConnection( "jdbc:oracle:thin:@sligo.fh-trier.de:1521:ubuntu", "dbsem_java","javajava");
    CallableStatement stmt = null;
    ResultSet rs1 = null;
    int matrnr = 945098;
    // Call PLSQL Stored Procedure
    stmt = (CallableStatement)c.prepareCall("{ call ? := getklausuren(?) }");
    stmt.setInt(2, matrnr);
    // 2nd parameter is OUT paremeter
    stmt.registerOutParameter(1, OracleTypes.CURSOR);
    // Execute the callable statement
    stmt.execute();
    //Cursor in ResultSet einlesen
    rs1 = ((OracleCallableStatement)stmt).getCursor(1);
    ResultSetMetaData rsmd = rs1.getMetaData();
    int anzSpalten = rsmd.getColumnCount();
    List<String[]> zeilen = new ArrayList<String[]>();
    while(rs1.next())
    String[] zeile = new String[anzSpalten];
    for (int i=1; i<=anzSpalten; i++)
    zeile[i-1]=rs1.getString(i);
    zeilen.add(zeile);
    String[][] array_angeb_klaus = (String[][])zeilen.toArray(new String[zeilen.size()][anzSpalten]);
    //**** ENDE
    rs1.close();
    stmt.close();
    //c.close();
    catch (SQLException e){
    System.out.println(e);
    catch (ClassNotFoundException f){
    System.out.println(f);

    On top of what jschell says, this just looks wrong in terms of how Oracle's internal Java works as well.
    [Have a look here |http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/refcur/index.html] (unless things have changed significantly over the past few years for Oracle Java).
    Is the db you are querying a different one to the one this Java is stored in?

  • Call to Oracle stored procedure that returns ref cursor doesn't work

    I'm trying to use an OData service operation with Entity Framework to call an Oracle stored procedure that takes an number as an input parameter and returns a ref cursor. The client is javascript so I'm using the rest console to test my endpoints. I have been able to successful call a regular Oracle stored procedure that takes a number parameter but doesn't return anything so I think I have the different component interactions correct. When I try calling the proc that has an ref cursor for the output I get the following an error "Invalid number or type of parameters". Here are my specifics:
    App.config
    <oracle.dataaccess.client>
    <settings>
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursor.P_RESULTS" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursorMetaData.P_RESULTS.Column.0" value="implicitRefCursor metadata='ColumnName=WINDFARM_ID;BaseColumnName=WINDFARM_ID;BaseSchemaName=PGDATA_WC;BaseTableName=WORKORDERS;NATIVEDATATYPE=Number;ProviderType=Int32'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursorMetaData.P_RESULTS.Column.1" value="implicitRefCursor metadata='ColumnName=STARTTIME;BaseColumnName=STARTTIME;BaseSchemaName=PGDATA_WC;BaseTableName=WORKORDERS;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursorMetaData.P_RESULTS.Column.2" value="implicitRefCursor metadata='ColumnName=ENDTIME;BaseColumnName=ENDTIME;BaseSchemaName=PGDATA_WC;BaseTableName=WORKORDERS;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursorMetaData.P_RESULTS.Column.3" value="implicitRefCursor metadata='ColumnName=TURBINE_NUMBER;BaseColumnName=TURBINE_NUMBER;BaseSchemaName=PGDATA_WC;BaseTableName=WORKORDERS;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursorMetaData.P_RESULTS.Column.4" value="implicitRefCursor metadata='ColumnName=NOTES;BaseColumnName=NOTES;BaseSchemaName=PGDATA_WC;BaseTableName=WORKORDERS;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYWINDFARMID.RefCursorMetaData.P_RESULTS.Column.5" value="implicitRefCursor metadata='ColumnName=TECHNICIAN_NAME;BaseColumnName=TECHNICIAN_NAME;BaseSchemaName=PGDATA_WC;BaseTableName=WORKORDERS;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="PGDATA_WC.ODATAPOC.GETWORKORDERSBYID.RefCursor.P_RESULTS" value="implicitRefCursor bindinfo='mode=Output'" />
    </settings>
    OData Service Operation:
    public class OracleODataService : DataService<OracleEntities>
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(DataServiceConfiguration config)
    // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
    // Examples:
    config.SetEntitySetAccessRule("*", EntitySetRights.All);
    config.SetServiceOperationAccessRule("GetWorkOrdersByWindfarmId", ServiceOperationRights.All);
    config.SetServiceOperationAccessRule("CreateWorkOrder", ServiceOperationRights.All);
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
    [WebGet]
    public IQueryable<GetWorkOrdersByWindfarmId_Result> GetWorkOrdersByWindfarmId(int WindfarmId)
    return this.CurrentDataSource.GetWorkOrdersByWindfarmId(WindfarmId).AsQueryable();
    [WebGet]
    public void CreateWorkOrder(int WindfarmId)
    this.CurrentDataSource.CreateWorkOrder(WindfarmId);
    Here is the stored procedure:
    procedure GetWorkOrdersByWindFarmId(WINDFARMID IN NUMBER,
    P_RESULTS OUT REF_CUR) is
    begin
    OPEN P_RESULTS FOR
    select WINDFARM_ID,
    STARTTIME,
    ENDTIME,
    TURBINE_NUMBER,
    NOTES,
    TECHNICIAN_NAME
    from WORKORDERS
    where WINDFARM_ID = WINDFARMID;
    end GetWorkOrdersByWindFarmId;
    I defined a function import for the stored procedure using the directions I found online by creating a new complex type. I don't know if I should be defining the input parameter, WindfarmId, in my app.config? If I should what would that format look like? I also don't know if I'm invoking the stored procedure correctly in my service operation? I'm testing everything through the rest console because the client consuming this information is written in javascript and expecting a json format. Any help is appreciated!
    Edited by: 1001323 on Apr 20, 2013 8:04 AM
    Edited by: jennyh on Apr 22, 2013 9:00 AM

    Making the change you suggested still resulted in the same Oracle.DataAccess.Client.OracleException {"ORA-06550: line 1, column 8:\nPLS-00306: wrong number or types of arguments in call to 'GETWORKORDERSBYWINDFARMID'\nORA-06550: line 1, column 8:\nPL/SQL: Statement ignored"}     System.Exception {Oracle.DataAccess.Client.OracleException}
    I keep thinking it has to do with my oracle.dataaccess.client settings in App.Config because I don't actually put the WindfarmId and an input parameter. I tried a few different ways to do this but can't find the correct format.

  • Calling a Oracle Stored Procedure which will take a while to complete

    Hey.
    I'm calling a Oracle stored procedure which goes of and do a whole lot of things and therefore takes a fair while to complete.
    Currently I am doing this:
    String sql = "begin concorde.start_transfer(); end;";
    HibernateUtil.getSessionFactory().openStatelessSession().connection().prepareCall(sql).execute();
    ....Where HibernateUtil is just a mean to get to the SessionFactory. The connection I get is the same one as a JDBC, I think.
    I would want to regain control of the application as soon as the procedure is called and continue with the rest of the logic.
    How do I do that? Do I have to initiate it from a different thread?
    Thanks

    If it was me I wouldn't have a stored proc that took a while to complete. Instead I would submit a job to job queue. In terms of implementation I would call a proc that writes a record to a table. Then a process in the database polls that table and runs jobs it finds there. Then reports results somewhere.
    Sometime later you collect the results.
    But without that then the solution in java is obvious - create a thread.

  • How to execute the parametered stored procedure in sql *plus ?

    how to execute the parametered stored procedure in sql *plus ?
    my storedprocedure format
    CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
    (empDOB out date, empEmpName out varchar2)
    thanks & regards
    mk_mur

    Oh, sorry... making many reading-too-fast mistakes today...
    You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
    TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
      2  d date := sysdate;
      3  e varchar2(10) := 'bob';
      4  begin
      5  empdob := d;
      6  empempname := e;
      7  end;
      8  /
    Procedure created.
    TEST> var d varchar2(30)
    TEST> var n varchar2(30)
    TEST> call  SMS_SELECTMPLOYEE(:d,:n);
    Call completed.
    TEST> print d n
    D
    11/07/06
    N
    bobYoann.

Maybe you are looking for

  • Application Switcher Not Working correctly

    Selecting a program opens desired program properly(as displayed in Menu Bar) but will not open the corresponding program's open windows until selecting program in a Mission Control desktop. After selecting the desktop to which the program is attached

  • How to restrict two items in one sales order.

    Hi , My client wants that in one sales order two material say Mat -A and Mat-B should not go together. It should go in seprate sales order due to chemical nature both product should go  seprately. Kindly advise me how to configure it. Give full detai

  • How to implement drag and drop functionality in a HTML5 webpage using touch events?

    Hi all,      I need to create a webpage having two parts.One part is having set of SVG images into it and other part is having canvas.I need to drag those image onto the canvas allowing same image for multiple times and those images on the canvas are

  • Importing DVD Movies into iMovie with anything OTHER than a camcorder

    I tried to look around the discussion board for my questions but 643 pages is a lot. This question has probably been asked 8,000,000 times but I will be 8,000,001. I recorded some video footage on to a DVD-R disc. I tried to insert this disc into my

  • Generate XML report from the database and send EMail - BPEL 10g

    Hello, I was looking for the solution to generate XML report with the values from databaseadapter (select result from any table ) this result can be hundred's of records. so I have to generate the xml report from the result I received from DBADapter