JDBC Receiver to ORACLE Stored Procedure

Hi Experts
I browed the forum and could not find a strait answer to my problem. Hence I am posting this thread.
I have a sync call using JDBC Receiver to ORACLE stored procedure.
The definition of the procedure is as follows:
CREATE OR REPLACE procedure TW.XI_TEST
    (p_edi_extract_id varchar2, p_res out edi_extract%rowtype) is
t edi_extract%rowtype;
begin
  select *
  into p_res
  from edi_extract e
  where e.edi_extract_id = to_number(p_edi_extract_id);
exception
   when no_data_found then
        p_res := t;
end XI_TEST;
The request XML is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MT_EDIExtractSelectionRequest xmlns:ns0="urn:zim.com:tests">
<STATEMENT>
<PROC_NAME ACTION="EXECUTE">
  <TABLE>TW.XI_TEST</TABLE>
  <EDI_EXTRACT_ID isInput="true" type="STRING">4223142</EDI_EXTRACT_ID>
  </PROC_NAME>
  </STATEMENT>
  </ns0:MT_EDIExtractSelectionRequest>
The error I am getting is as follows:
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
Error processing request in sax parser:
Error when executing statement for table/stored proc. 'TW.XI_TEST' (structure 'STATEMENT'):
java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306:
wrong number or types of arguments in call to 'XI_TEST' ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any help would be appreciated.
Regards
Effi.

>
Rajesh wrote:
> > Hi Rajesh
> >
> > The structure of my data type for the request query is as follows:
> >
> >
DT_EDIExtractSelectionRequest (Complex Type)
> >    STATEMENT (Element)
> >       PROC_NAME (Element)
> >          ACTION (Attribute) _mapped to_: EXECUTE
> >          TABLE (Element) _mapped to_: TW.XI_TEST
> >          EDI_EXTRACT_ID (Element) _mapped to_: 123456
> >             isInput (Attribute) _mapped to_: true
> >             type (Attribute) _mapped to_: STRING
> >          EDI_EXTRACT (Element)
> >             isOutput (Attribute) _mapped to_: true
> >             type (Attribute) _mapped to_: CURSOR
> >
> >
>
>
> Change the DT type to like below
>
>            STATEMENT (Element)
>                   ACTION (Attribute) _mapped to_: EXECUTE
>                   TABLE (Element) _mapped to_: TW.XI_TEST
>                   EDI_EXTRACT_ID (Element) _mapped to_: 123456
>                        isInput (Attribute) _mapped to_: true
>                        type (Attribute) _mapped to_: STRING
>                   EDI_ETRACT (Element)
>                      isOutput (Attribute) _mapped to_: true
>                     type (Attribute) _mapped to_: CURSOR

> and try ...actually i dont remeber the exact strucuture..but i tolo faced the same pain of this
>
> HTH
> Rajesh
Hi Rajesh
Changing the DT per your suggestion result in the following error:
<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser:
No 'action' attribute found in XML document
(attribute "action" missing or wrong XML structure)</SAP:AdditionalText>
Omitting the PROC_NAME element from the DT is not correct.
Also, I would also like to clarify that the variables of the DT I am using are:
EDI_EXTRACT_ID is defined as string
EDI_EXTRACT is defined as string
Because the variable p_res is mapped to nothing in the request payload it does not show.
I read in one of the posts that this is correct and the variable is used due to the fact the isOutput attribute is true.
Regards,
Effi.
Edited by: Effi Olivkovitch on Dec 6, 2009 9:11 AM
Edited by: Effi Olivkovitch on Dec 6, 2009 9:18 AM

Similar Messages

  • JDBC Sender adapter - Oracle - Stored Procedure - Error

    Hello,
    Need few clarifications on JDBC sender adapter and stored procedures when connecting to Oracle DB.
    My scenario is, Oracle to SAPBW. So in sender JDBC adapter, we have used a SP having multiple SQL statements it, esp. one of the SELECT statment having Joins on a table and View.
    My questions are,
    1) Is it possible to have more SQL statements in SP for Sender JDBC?
    2) Is the SP of Oracle DB returns resultset or cursor?
    I have tried in searching the forum perticularly for connecting to Oracle as Sender and below like said  that there is a limitation of XI JDBC when connecting to Oracle.
    Executing an Oracle Stored Procedure from Sender JDBC adapter
    So please clarify the doubts and help me.
    With regards,
    Jilan

    Hi Jilan,
    Unlike what was mentioned in the link given by you that oracle returns cursor and not resultset is not completely true. It may be difficult but certainly not impossible.
    Refer : http://www.enterprisedt.com/publications/oracle/result_set.html
    regards
    joel

  • JDBC Receiver Adapter - Call Stored Procedure

    Hi,
    I am using a JDBC receiver adapter to call a stored procedure in oracle.
    My target structure looks like:-
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <table>realStoredProcedureName</table>
    <serialDate hasQuot="NO" isInputType="true" type="date">TO_DATE('07-15-2008 08:00:11','MM-DD-YYYY HH24:MI:SS')</serialDate>
    <serialNo isInputType="true" type="NUMERIC">123456</serialNo>
    </storedProcedureName>
    </STATEMENT>
    The storedprocedure takes two input values and has one output value.
    The first parameter of the stored procedure is serialDate and the second input parameter is serialNo.
    I am getting an exception:-
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'storedProcedureName' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('07"</SAP:AdditionalText>
    Any ideas how to fix this issue.
    Thanks.
    Krishnan

    Hi Krishnan,
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <table>realStoredProcedureName</table>
    <serialDate hasQuot="NO" isInputType="true" type="date">TO_DATE('07-15-2008 08:00:11','MM-DD-YYYY HH24:MI:SS')</serialDate>
    <serialNo isInputType="true" type="NUMERIC">123456</serialNo>
    </storedProcedureName>
    </STATEMENT>
    The storedprocedure takes two input values and has one output value.
    The first parameter of the stored procedure is serialDate and the second input parameter is serialNo.
    I am getting an exception:-
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'storedProcedureName' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('07"</SAP:AdditionalText>
    In the XML structure you cannot use TO_DATE function . Please pass the DATE in the correct format which the Stored procedure can accept .  Get the out put what you expected from TO_DATE function and use that value in the structure.
    Regards,
    Kishore

  • Executing an Oracle Stored Procedure from Sender JDBC adapter

    I could really use some help from someone who had done this before. 
    I've read the help about using the JDBC sender adapter, but it's not helping enough.
    I found this line: "Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs."
    That's definately what we want to do, but we can't figure out the syntax.
    The procedure in oracle looks like this:
    CREATE OR REPLACE PROCEDURE test_ref_cursor
    ( cur_generic IN OUT result_sets.cur_generic)
    as
    BEGIN
    Open cur_generic for
    select
       proposal_number,
       to_char(sequence_number),
       column_name,
       column_value,
       update_timestamp,
       update_user
       from
       coeus.sap_test;
    END test_ref_cursor;
    And we have tried every kind of statement we can think of, but the file adapter always gives us an "invalid sql statement" error.
    Does anyone know what syntax we need to put in the "Query SQL Statement" in the JDBC sender adapter in order to call this procedure?  Or is there something wrong with the procedure that is causing the error?
    <i>I will absolutely return and give points, but PLEASE read my whole post before answering and do not just link me to or quote the help for configuring a sender JDBC adapter or blogs that are about the JDBC adapter in general but do not deal with the issues I am having. Thank you.</i>

    Hi Vanda,
    Unfortunately, the sender JDBC adapter does not support Oracle's store procedure/function.  Unlike stored procedures from other database vendors, Oracle returns a cursor, not a resultset.  The sender JDBC adapter must send a resultset to XI.
    There are 2 possible ways you can accomplish this:
    1.  Use BPM and call the Oracle stored procedure using a receiver adapter via a asynch-synch bridge.
    2.  Develop a user-module for the adapter, which can be used with a sender adapter.
    Thanks
    Prasad

  • JDBC Sender - Oracle Stored procedures

    hi all
    i am working on JDBC sender - File receiver
    I am fetching data from Oracle database
    if i write select query directly in sender adapter the scenario is working properly but when try to write stored procedure in oracle and use execute statement in JDBC, adapter is throwing error.
    As in oracle to fetch multiple rows i have to use cursors .
    i read lot of articles in forum but still not clear on following issues :can any one solve them?
    1 . To get multiple rows can i write SP without cursors?
    2 . If SP is using cursor do my XI accept it or it only accepts  resultset? in that     case how to write sp.
    thanks & regards
    sheetal

    Sheetal,
    Adding to Jai Shankar's reply, Like pointed out, Oracle Stored Procedures return Cursors and XI sender JDBC adapter expects resultsets and so it is not possible to call Oracle SP's from Sender JDBC adapters.
    But, I have also come across a few recent threads where there have been discussions that this is possible  from SP 16 onwards. I have not been able to check and confirm on this, but, maybe you can check your SP level and see if you are below SP 16 . If yes, definetly not possible. If SP 16, or above, a Quick OSS to SAP should surely give the answer if it is possible or not!
    Do let us know your findings.
    Regards
    Bhavesh

  • Invoking Oracle stored procedures from within a JDBC channel for PI 7.1

    Hi ,
    Can anybody tell me that is it possible to invoke Oracle stored Procedure from within a JDBC  sender channel for PI 7.1.
    Its working in XI3.0 and XI 7.0 for Oracle DBMS versions >= 10.2.x. But I am not sure,whether it will work for PI 7.1 also.
    Thanks & Regards,
    Saru

    HI,
    refer below link,there is no much difference in PI7.1 ,executing stored procedure is same .
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/7b72b2fde93673e10000000a114a6b/content.htm
    Regards,
    Raj

  • Passing XMLType Data into oracle stored procedure using JDBC

    Hi Friends,
    I have requirement where my oracle stored procedure accepts XML file as an input. This XML File is generated in runtime using java, I need to pass that xml file using JDBC to oracle stored procedure. Please let me know the fesibile solution for this problem.
    Following are the environment details
    JDK Version: 1.6
    Oracle: 10g
    Server: Tomcat 6.x
    Thanks in Advance

    user4898687 wrote:
    I have requirement where my oracle stored procedure accepts XML file as an input. This XML File is generated in runtime using java, I need to pass that xml file using JDBC to oracle stored procedure. Please let me know the fesibile solution for this problem.As stated - no.
    A 'file' is a file system entity. There is no way to pass a 'file' anywhere. Not PL/SQL. Not java.
    Now you can pass a file path (a string) in java and to PL/SQL.
    Or you can pass xml data (a string) in java and to PL/SQL. For PL/SQL you could use eithe a varchar2, if the xml is rather small, or a blob/clob.

  • JDBC Thin-Driver and Oracle Stored Procedure

    I've got a Oracle stored procedure which returns a Oracle record.
    How can I retrieve the record in java using the JDBC Thin-Driver ?
    Record:
    TYPE messagerec IS RECORD
    (log_level VARCHAR(2), timestamp VARCHAR2(19), text VARCHAR2(200));

    Using PL/SQL BOOLEAN, RECORD Types, and TABLE Types:
    Oracle SQLJ and JDBC do not support calling arguments or return values of the
    PL/SQL BOOLEAN type or RECORD types. Also, when using the Thin driver, they
    do not support calling arguments or return values of PL/SQL TABLE types (known
    as indexed-by tables). TABLE types are supported for the OCI driver.
    Check the following guide,
    http://otn.oracle.com/tech/java/sqlj_jdbc/pdf/a96655.pdf

  • Oracle Stored Procedure not working

    Hi Guy's,
    I want to connect directly from Visual Composer to Oracle Database 10.2.x.x using Oracle Stored Procedure and JDBC System to demonstrate how easy you can show data vith VC. So I have created a simple Oracle Stored Procedure, a JDBC System with a valid alias, User mapping (Portal User --> Oracle User).
    When I invoke the stored procedure I receive the following error: "Portal request Failed (Could not execute stored procedure)". The Stored Procedure is working fine in Oracle iSQL*Plus.
    Any idea's?
    Thanks,
    Ridouan

    Hi,
    did you use the portal JDBC as it is described here:
    <a href="https://wiki.sdn.sap.com/wiki/display/VC/Cannotseetables">https://wiki.sdn.sap.com/wiki/display/VC/Cannotseetables</a>
    Best Regards,
    Marcel

  • Calling a java class in my oracle database from a oracle stored procedure

    my oracle stored procedure is:
    create or replace
    PROCEDURE openpdffile
    AS LANGUAGE JAVA
    NAME 'pdfopenbook.mainbook()';
    it is valid and so is this java class;
    import java.sql.*;
    import oracle.jdbc.*;
    public class pdfopenbook //class pdfopen
    public static void mainbook(String args[]) //main function
    try //try statement
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "c:\\temp
    final_book.pdf");
    // Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "sol.exe");
    } catch (Exception e) //catch any exceptions here
    System.out.println("Error" + e ); //print the error
    but i get the error:
    onnecting to the database caprs.
    ORA-29531: no method mainbook in class pdfopenbook
    ORA-06512: at "CAPRS.OPENPDFFILE", line 1
    ORA-06512: at line 2
    Process exited.
    Disconnecting from the database caprs.
    it says there is no mainbook method but there is, what am i doing wrong??
    Thanks,
    Doug

    Pass String[] as an argument to mainbook():
    create or replace PROCEDURE openpdffile
    AS LANGUAGE JAVA
    NAME 'pdfopenbook.mainbook(java.lang.String[])';Have you posted it on the Database forum?
    Regards,
    Nick

  • How to call oracle stored procedure with OUT parameter?

    I create oracle stored procedure in eclipse oepe
    PROCEDURE SP_SELECT_ORA (
    ID_INPUT IN VARCHAR2,
    ID_OUTPUT OUT VARCHAR2,
    PASSWD_OUTPUT OUT VARCHAR2,
    NAME_OUTPUT OUT VARCHAR2) IS
    BEGIN
    SELECT EMP_ID, EMP_Passwd, EMP_Name
    INTO ID_OUTPUT, PASSWD_OUTPUT, NAME_OUTPUT
    FROM family
    WHERE EMP_ID = ID_INPUT;
    END;
    and I try to call the sp in jpa like below,
    @NamedNativeQueries({
         @NamedNativeQuery(name = "callSelectSP", query = "call SP_SELECT_ORA(?,?,?,?)", resultClass = Members.class)
    @Entity
    @Table(name="family")
    public class Members implements Serializable {
         @Id
         @Column(name = "EMP_ID")
         private String ID;
         @Column(name = "EMP_Passwd")
         private String Passwd;
         @Column(name = "EMP_Name")
         private String Name;
    ==============
    @PersistenceContext(unitName="MyFamily")
         EntityManager em;
    query = em.createNamedQuery("callSelectSP");
         query.setParameter(1, ID);
         String id_output = null;
         String passwd_output = null;
         String name_output = null;
         query.setParameter(2,id_output);
         query.setParameter(3,passwd_output);
         query.setParameter(4,name_output);
         query.executeUpdate();
         member = (Members)query.getSingleResult();
    But this query throws exception,
    19:55:35,500 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 1465, SQLState: 72000
    19:55:35,500 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) ORA-01465: invalid hex number
    I don't know how. Pls, give me your advice. Thanks in advnace.
    Best regards

    Thank you for your reply, Chris!
    I tried this one.
    @NamedNativeQueries({
    @NamedNativeQuery(name = "callSelectSP", query = "exec SP_SELECT_ORA( ?, :id_output, :passwd_output, :name_output) " , resultClass = Members.class)
    @Entity
    @Table(name="family")
    public class Members implements Serializable
    ===================
    query = em.createNamedQuery("callSelectSP");
    query.setParameter(1, ID);
    String id_output = null;
    String passwd_output = null;
    String name_output = null;
    query.setParameter("id_output", id_output);
    query.setParameter("passwd_output", passwd_output);
    query.setParameter("name_output",name_output);
    query.executeUpdate();
    On Console hibernate shew the sql and ora # like below,
    19:59:25,160 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: exec SP_SELECT_ORA( ?, ?, ?, ?)
    19:59:25,192 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 900, SQLState: 42000
    19:59:25,192 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) ORA-00900: Invalid SQL statement
    Pls, inform me your advice. Thanks in advance.
    Best regards.

  • Passing Arrays of User Defined Types to Oracle Stored Procedures

    Hi
    I am using WebLogic 8.14 & Oracle 9i with thin JDBC driver.
    Our application needs to perform the same DB operation for every item in a Java Collection. I cannot acheive the required performance using the standard Prepare & Execute loop and so I am looking to push the whole collection to Oracle in a single invocation of a Stored Procedure and then loop on the database.
    Summary of Approach:
    In the Oracle database, we have defined a Object Type :
    CREATE OR REPLACE
    TYPE MYTYPE AS OBJECT
    TxnId VARCHAR2(40),
    Target VARCHAR2(20),
    Source VARCHAR2(20),
    Param1 VARCHAR2(2048),
    Param2 VARCHAR2(2048),
    Param3 VARCHAR2(2048),
    Param4 VARCHAR2(2048),
    Param5 VARCHAR2(2048),
    and we have defined a collection of these as:
    CREATE OR REPLACE
    TYPE MYTYPE_COLLECTION AS VARRAY (100) OF MYTYPE
    There is a stored procedure which takes one of these collections as an input parameter and I need to invoke these from within my code.
    I am having major problems when I attempt to get the ArrayDescriptor etc to allow me to create an Array to pass to the stored procedure. I think this is because the underlying Oracle connection is wrapped by WebLogic.
    Has anyone managed to pass an array to an Oracle Stored procedure on a pooled DB connection?
    Thanks
    Andy

    Andy Bowes wrote:
    Hi
    I am using WebLogic 8.14 & Oracle 9i with thin JDBC driver.
    Our application needs to perform the same DB operation for every item in a Java Collection. I cannot acheive the required performance using the standard Prepare & Execute loop and so I am looking to push the whole collection to Oracle in a single invocation of a Stored Procedure and then loop on the database.
    Summary of Approach:
    In the Oracle database, we have defined a Object Type :
    CREATE OR REPLACE
    TYPE MYTYPE AS OBJECT
    TxnId VARCHAR2(40),
    Target VARCHAR2(20),
    Source VARCHAR2(20),
    Param1 VARCHAR2(2048),
    Param2 VARCHAR2(2048),
    Param3 VARCHAR2(2048),
    Param4 VARCHAR2(2048),
    Param5 VARCHAR2(2048),
    and we have defined a collection of these as:
    CREATE OR REPLACE
    TYPE MYTYPE_COLLECTION AS VARRAY (100) OF MYTYPE
    There is a stored procedure which takes one of these collections as an input parameter and I need to invoke these from within my code.
    I am having major problems when I attempt to get the ArrayDescriptor etc to allow me to create an Array to pass to the stored procedure. I think this is because the underlying Oracle connection is wrapped by WebLogic.
    Has anyone managed to pass an array to an Oracle Stored procedure on a pooled DB connection?
    Thanks
    AndyHi. Here's what I suggest: First please get the JDBC you want to work in a
    small standalone program that uses the Oracle thin driver directly. Once
    that works, show me the JDBC code, and I will see what translation if
    any is needed to make it work with WLS. Will your code be running in
    WebLogic, or in an external client talking to WebLogic?
    Also, have you tried the executeBatch() methods to see if you can
    get the performance you want via batches?
    Joe

  • 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.

  • Oracle Stored Procedure Call

    Hi,
    I have an Oracle Stored Procedure that I must be calling. The procedure takes two IN parameters, and returns a CHAR(1000) string, not via the OUT parameter, but as normal return.
    I have read articles about how to make Procedure Calls with OUT parameters, but didnt find any on my case. I have tried several options but still get parameter binding errors.
    What I am trying right now is this:
    If anyone
    <b>======== code ==============</b>
    SQLParameter[] params = new SQLParameter[2];
    // Construct three objects corresponding to initial values
    Object objMsisdn = new String("9656364550");
    Object objUsername = new String("abc");
    String output;
    // prepare the oracle procedure parameters
    params[0] = new SQLParameter(objMsisdn, Types.VARCHAR, SQLParameter.IN);
    params[1] = new SQLParameter(objUsername, Types.VARCHAR, SQLParameter.IN);
    try{
    output = custDetDB.getCustDetails(params);
    <b>========================================</b>
    Java DB Control:
    <b>========================================</b>
    * @jc:sql statement="{call www_custdet(?,?)}"
    String getCustDetails(SQLParameter[] params) throws SQLException;
    Right now I am getting "Not All Variables Bound Error". I tried to have all IN & OUT parameters sent as SQLParameter before but that didnt work either.
    Any hints?

    Bashar Abdullah wrote:
    Hi,
    > I have an Oracle Stored Procedure that I must be calling. The procedure takes two IN parameters, and returns a CHAR(1000) string, not via the OUT parameter, but as normal return.
    As far as I know, it is impossible for an Oracle
    stored procedure to return anything except
    as output parameters. Show the text of the procedure,
    and tell us what JDBC driver you're using.
    Joe
    I have read articles about how to make Procedure Calls with OUT parameters, but didnt find any on my case. I have tried several options but still get parameter binding errors.
    > What I am trying right now is this:
    If anyone
    > <b>======== code ==============</b>
    > SQLParameter[] params = new SQLParameter[2];
    >
    // Construct three objects corresponding to initial values
    > Object objMsisdn = new String("9656364550");
    > Object objUsername = new String("abc");
    > String output;
    >
    > // prepare the oracle procedure parameters
    > params[0] = new SQLParameter(objMsisdn, Types.VARCHAR, SQLParameter.IN);
    > params[1] = new SQLParameter(objUsername, Types.VARCHAR, SQLParameter.IN);
    >
    try{
    > output = custDetDB.getCustDetails(params);
    > <b>========================================</b>
    > Java DB Control:
    > <b>========================================</b>
    > /**
    > * @jc:sql statement="{call www_custdet(?,?)}"
    > */
    > String getCustDetails(SQLParameter[] params) throws SQLException;
    >
    > Right now I am getting "Not All Variables Bound Error". I tried to have all IN & OUT parameters sent as SQLParameter before but that didnt work either.
    >
    Any hints?

  • Not able to get Oracle stored procedure return value passed to Powerbuilder

    I have an Oracle Stored Procedure that receives a string value and returns a string value..  When I call it from Powerbuilder, it executes but does not send the return value of a string back.  I am trying to encrypt a string in Powerbuilder, pass it to a .net web page and then decrypt so I can check the security tables for permissions to view the web page.  I have tried creating a simple stored procedure that takes a string and returns a string to Powerbuilder; but even that is not working.  Any suggesstions?
    Oracle Procedure:
    CREATE OR REPLACE
    PROCEDURE               TESTINOUT_VARCHAR
    ( P_STRING IN VARCHAR2, P_OUT OUT VARCHAR2)
    IS
       BEGIN  
          P_OUT := P_STRING || 'TESTING';
    END TESTINOUT_VARCHAR;
    Powerbuilder Call:
    string p_string ='                                 '
    Declare TestingString procedure for TESTINOUT_VARCHAR(:ls_group, :p_out) using SQLCA
    Execute TestingString;
    IF SQLCA.CODE = 0 THEN
    FETCH TestingString into:p_out;
    End If
    p_string = p_out;

    Hello John,
    I'm not sure if you already found a solution using an ODBC connection.
    Below the solution with an RPC call:
    Create a user object (uo_trans) of type transaction with the following local external function:
    subroutine TESTINOUT_VARCHAR(string P_STRING,ref string P_OUT) RPCFUNC
    Execute this script
    uo_trans l_transaction
    string ls_outparam
    l_transaction = CREATE uo_trans
    // Profile ODBC_ORA
    l_transaction.DBMS = "ODBC"
    l_transaction.AutoCommit = False
    l_transaction.DBParm = "ConnectString='DSN=ODBC_ORA;UID=system;PWD=<xxxxxx>'"
    connect using l_transaction;
    ls_outparam = space (30)
    l_transaction.testinout_varchar( sle_1.text, ls_outparam)
    messagebox("OUT parameter", ls_outparam)
    disconnect using l_transaction;
    DESTROY l_transaction

Maybe you are looking for

  • Xorg 1.8 : Does it work with Xorg -configure?

    Hey everyone Does Xorg 1.8 work with Xorg --configure  or would one have to manually set the configuration files in /etc/X11/xorg.conf.d/?  Also another question, if I am using xorg 1.8. do I still have to add HAL to the list of DAEMONS  in /etc/rc.c

  • CRM survey - link to original document.

    We create an repair order in CRM and send an URL link for an survey to collect feedback on the service to the customer through mail, that has been set up as an action that gets trigger once the order is completed. We have an action that is triggered

  • Where to Buy in Florida? (WRVS4400N)

    Would someone tell me where to buy the WRVS4400N VPN capable Wireless Router, in Florida? Hopefully / preferably if possible, at a retail store ? thanks,

  • Version of Application Server for Oracle E-Business suite 12.0.4 ?

    Hi , I want to know the complete version of Application Server for Oracle E-Business suite 12.0.4 . The installation guide/ rapid install mention this : A) Oracle database 10.2.0.3 B)Applications Server : 10.1.3 oc4j C) Application Server : 10.1.2.2

  • Cannot find PortableRemoteObject

    Greetings: I am attempting to compile an EJB test client using the Sun tools. I am running on a Red Hat Linux environment. My classpath is as follows: CLASSPATH=/home/work/research/jdk1.3.1_01 and I am attempting to do the compile using compile.sh, w