Calling Procedure B from Procedure A having parameters

Hi,
I have two procedures, I m registering first procedure as a concurrent program  like  XXXpackage.main
I want to call Procudure new_segments_id from Procedure main.
I need l_old_id  parameter for new_segments_id procedure, so I m passing to main procedure.
Now, how should i call new_segments_id procedure from main procedure.
Procedure main(
                       errbuf       OUT VARCHAR2
                      ,retcode    OUT VARCHAR2
                      ,l_old_id    IN  NUMBER
Procudure new_segments_id(l_old_id    IN  NUMBER
                                         ,l_new_id   OUT NUMBER
Thanks.

Not sure if this is what exactly you want but below is an example of propagation of OUT parameters of one procedure as IN parameters to the another procedure within the same package.
SQL> CREATE OR REPLACE
  2  PACKAGE PACKAGE_TEST
  3  AS
  4    PROCEDURE procedure_1(
  5        out_ename OUT VARCHAR2);
  6    PROCEDURE procedure_2(
  7        v_ename VARCHAR2);
  8  END PACKAGE_TEST;
  9  /
Package created.
SQL> CREATE OR REPLACE
  2  PACKAGE body package_test
  3  IS
  4  PROCEDURE procedure_1(
  5      out_ename OUT VARCHAR2)
  6  AS
  7    v_ename VARCHAR2(200) := 'SMITH' ;
  8  BEGIN
  9    SELECT
10      ename
11    INTO
12      out_ename
13    FROM
14      emp
15    WHERE
16      ename = v_ename;
17    DBMS_OUTPUT.PUT_LINE('PROCEDURE 1');
18    procedure_2(out_ename);
19  END;
20
21  PROCEDURE procedure_2(
22      v_ename VARCHAR2)
23  IS
24  v_count number;
25  BEGIN
26    DBMS_OUTPUT.PUT_LINE('PROCEDURE 2');
27    dbms_output.put_line(V_ENAME);
28    select count(*) into v_count from emp where ename = v_ename;
29    dbms_output.put_line('COUNT is ' || v_count);
30  END;
31  END;
32
33  /
Package body created.
SQL> DECLARE
  2    ENAME VARCHAR2(5);
  3  BEGIN
  4    package_test.procedure_1(ENAME);
  5  END;
  6  /
PROCEDURE 1                                                                   
PROCEDURE 2                                                                   
SMITH                                                                         
COUNT is 1                                                                    
PL/SQL procedure successfully completed.
Ishan.

Similar Messages

  • Problem call Dll C from procedure

    Hi all, I have dll write by C and with function A(String[] param). I want call this is function from procedure on Oracle. Please help me step to step do it.
    Thank you so much.

    MobizCOM jsc wrote:
    The pszParams is an array of pointers to 4 strings (char **), and it is an IN/OUT parameter. It means we need to pass an array of string to external function in the dll, then the external update the array as an output parameter. After return to PL/SQL, we need to extract the updated values in the array to continue process.
    In my understanding, the most appropriate datatype with this in PL/SQL is "TABLE OF VARCHAR2". But it is a kind of collection. Does Oracle support to pass this datatype to external function?No.
    It is a mistake in thinking that an Oracle array will be a byte copy of how C represents an array in memory.
    We have tried to create a dll with simple function, simple parameters and it works. It seems that our configure for listener.ora are correctly.Correct. Which means it is now much simpler to focus on the actual challenge - passing data between the PL engine and a DLL using compatible data structures.
    I have done some basic testing with array types and PL and C do not seem to match at all in this respect. Which meant I defaulted to using scalar data types and variables only.
    You can point your browser to [http://tahiti.oracle.com|http://tahiti.oracle.com] and do some research yourself. There should be documentation describing the compatibility between PL and C data types.
    You can also use Pro*C to see what Oracle's precompiler does. It does a 2 step compilation - so Pro*C compiles the Pro*C code (C + SQL) into C source and then that gets compiled with the normal C compiler. Peeking at the C source code generated by Pro*C may provide better insights in how SQL and PL/SQL data types and mapped to C data types and vice versa.
    As for performance - in this case optimal performance is staying inside the PL engine and not stepping (context switching) to an external process interfacing with an external DLL. Therefore it would be best to replicate the functionality provided by that DLL into PL/SQL as far as possible.

  • Calling a Form from Report hyperlink  through parameters

    How do I query a form on load after it gets called from a report hyperlink. I would like to whether it can be done passing parameters from oracle reports to oracle forms, if so how do I send the value clicked from report hyperlink into an oracle form. Requesting help on this. Thank you.,

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by The Oracle Reports Team ([email protected]):
    SUGUNAN,
    There is no built in mechanism to call Oracle Forms from Oracle Reports. Usually, customers want to call Reports from Forms which is a built-in feature of Forms using Run_report_object.
    Regards,
    The Oracle Reports Team<HR></BLOCKQUOTE>
    Thanks for your reply. It would be very useful for customers like us, if Oracle can incorporate such a facility in the newer versions of Reports.
    Regards,
    Sugunan
    null

  • Calling a function from procedure

    Please someone let me know if I'm going in the right direction or am I making it too difficult for myself. I'm only using the exam guide on programming units which assumes the reader already has a firm grasp on the material. I am entry level and need guidance.
    The problem:
    write a calling procedure and a function that will accomplish the following: The calling procedure will find all employees on the EMP table who's hire date is between Jan 01 and Apr 30, 1981. The function will then a 5% pay raise for each of the selected employees. The calling procedure will then display the employee number, employee name, and the new salary for each of the selected employees. Logically, then, the calling procedure will find the first employee within the date range, pass the employee current salary to the function, the function will compute the 5% pay raise and return the new salary to the calling procedure. The calling procedure will then display the required results..
    //Function
    create or replace function func_calc_emp_raise
    (p_sal IN OUT NUMBER)
    RETURN NUMBER
    IS
    BEGIN
    p_sal := p_sal * 1.05;
    RETURN p_sal;
    END;
    //procedure
    CREATE OR REPLACE PROCEDURE PROC_EMP_RAISES
    (p_empno VARCHAR2,
    p_ename VARCHAR2,
    p_sal NUMBER)
    IS
    v_empno emp.empno%type;
    v_ename emp.ename%type;
    v_sal emp.sal%type;
    CURSOR cur_raise
    IS
    SELECT empno, ename, sal
    FROM emp
    where hiredate between
    TO_DATE('JAN-01-1981','MON-DD-YYYY') and
    TO_DATE('APR-30-1981','MON-DD-YYYY');
    BEGIN
    open cur_raise;
    LOOP
    FETCH cur_raise INTO v_empno, v_ename, v_sal;
    EXIT WHEN (cur_raise%NOTFOUND);
    v_sal:= func_calc_emp_raise(v_sal);
    END LOOP;
    close cur_raise;
    end proc_emp_raises;
    Both compile correctly but how do I get output?
    Dee

    I am not getting the error that you are. Did you create the function as originally posted? What version of Oracle are you using? I am using Oracle 8.1.7. Although it seems to tolerate the parameter passed to the function as IN OUT and allows modifictaion of the p_sal parameter, earlier versions of Oracle may require that it only be IN and that you not modify the input parameter. I have listed an alternate function below:
    SQL> CREATE OR REPLACE FUNCTION func_calc_emp_raise
      2    (p_sal IN NUMBER)
      3    RETURN      NUMBER
      4  IS
      5  BEGIN
      6    RETURN p_sal * 1.05;
      7  END func_calc_emp_raise;
      8  /
    Function created.
    SQL> SHOW ERRORS
    No errors.
    SQL> -- Procedure:
    SQL> CREATE OR REPLACE PROCEDURE proc_emp_raises
      2  AS
      3  BEGIN
      4    FOR rec IN
      5        (SELECT empno, ename, sal
      6         FROM      emp
      7         WHERE  hiredate BETWEEN TO_DATE ('JAN-01-1981','MON-DD-YYYY')
      8                   AND       TO_DATE('APR-30-1981','MON-DD-YYYY'))
      9    LOOP
    10        DBMS_OUTPUT.PUT_LINE
    11          (rec.empno              || ' '
    12           || RPAD (rec.ename, 20)
    13           || ' '
    14           || TO_CHAR (func_calc_emp_raise (rec.sal)));
    15    END LOOP;
    16  END proc_emp_raises;
    17  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> -- Execution:
    SQL> SET SERVEROUTPUT ON SIZE 500000
    SQL> EXECUTE proc_emp_raises
    7499 ALLEN                1680                                                 
    7521 WARD                 1312.5                                               
    7566 JONES                3123.75                                              
    PL/SQL procedure successfully completed.

  • Call to script from stored prcedure passing parameters

    Hello,
    I have a database on linux server. On the same server there is a shell script that takes 3 parameters.
    Now i want to make a procedure (stored procedure) that will take 3 parameters pass and run that script with those parameters.
    I had created directory object pointing to the correct directory granted all the privileges on it (i hope so).
    Now i was wondering how to code procedure?
    I also made a program within the database that takes 3 parameters but i do not know how to run it. I am not sure if i can use job to run the program because
    this is a multi user thing and i think it wont work as expected if 2 or more users will execute it.
    Anyway i was hoping i can solve this by creating procedure that will run script provided with 3 paramters i need.
    I hope I am clear on what i want to do.
    Please if u have any idea how to acomplish post your ideas.
    Thank you!

    Hello,
    first i want to thank you for the reply.
    1st option ... i would want not to use java or c because i do not have programming skills in those languages.
    2nd option you mentioned dbms_scheduler.
    If i understand correctly procedure should go like this.
    I create program whitin database. Then i create a job that will run this program. And everytime i want to execute my shell script i will run the job.
    Wha will happen if 2 different users will want to run script at the same time?
    Thank you for your answer.

  • Call Report Builder from Jdeveloper 10g with parameters

    hello , how are you
    i am in oracle forms for long , today i am work in jdeveloper 10g, i want some questions
    1- how call oracle report builder from oracle jdeveloper 10g with parameters
    2- if there aren't call from jdeveloper 10g, what is good report tools?
    thanks.

    I'm assuming that what you want to do is actually run a report from a JDeveloper application.
    To do this you can use the various ways that Reports offer to invoke reports with the report server - including URL & Web Service interfaces.
    More information on these in the Oracle Reports - Publishing reports manual.

  • Problem in Calling a report from form 6i using parameters

    Hello Oracle experts,
    I am facing a problem while calling a report using form 6i and passing parameters,
    Actually the problem is I want to use the parameters passed to reports in a
    query group in my report. I am not able to use the parameters passed by form to report in one of my query groups in report. Could anybody guide my how to use it.
    Thanks

    Hello Oracle experts,
    The parameters are getting passed successfully in my report.
    But I want to know hous to use it in my query group.
    I just want the syntax.
    Thanks

  • Call URL from procedure?

    Hi
    We have a Crystal Report Server which hosts Crystal Report and now we want to invoket report from PL/SQL procedure/function is it possible.
    Means Is it possible to invoke report by calling report URL from procedure or function.
    Thanks,
    Kuldeep

    You can certainly use UTL_HTTP to call a URL from a procedure. It's not obvious to me, though, whether that is all you need or whether you need to close the loop (i.e. respond to the results of the report) which may be more challenging.
    Be aware, of course, that calls via UTL_HTTP are not transactional, so it is entirely possible that the transaction that initiated the call could be rolled back after the UTL_HTTP call was made. For that reason, folks will commonly have a separate job that calls UTL_HTTP asynchronously after the triggering transaction commits.
    Justin

  • To call db2 stored procedure having parameters in java application

    Hi,
    I've created db2 stored procedure which is running perfectly on db2 server after giving a CALL to it. But when I tried to call this same stored procedure in java application, its reflecting with following error......
    com.ibm.db2.jcc.b.SqlException: [jcc][10100][10910][3.50.152] java.sql.CallableStatement.executeQuery() was called but no result set was returned.
    Use java.sql.CallableStatement.executeUpdate() for non-queries. ERRORCODE=-4476, SQLSTATE=null
    at com.ibm.db2.jcc.b.wc.a(wc.java:55)
    at com.ibm.db2.jcc.b.wc.a(wc.java:102)
    at com.ibm.db2.jcc.b.tk.b(tk.java:575)
    at com.ibm.db2.jcc.b.vk.yb(vk.java:136)
    at com.ibm.db2.jcc.b.vk.executeQuery(vk.java:114)
    at SPApplication.main(SPApplication.java:31)
    Here is the code.......
    import java.sql.*; public class SPApplication { public static Connection con; public static CallableStatement proc_stmt; public static ResultSet rs; /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try { Class.forName("DB2 DRIVER CLASS"); System.out.println("Class loaded....."); con = DriverManager.getConnection("jdbc:db2://localhost:PORTNO/" +                                   " DatabaseName", "username", "password"); System.out.println("Connection established....."); proc_stmt = con.prepareCall("call procedure_name(?)"); //IN Parameter proc_stmt.setInt(1, 5); System.out.println("Called procedure....."); rs = proc_stmt.executeQuery(); /******** THIS IS LINE NO. 31 *********/ while (rs.next()) {                              // Fetching rows one by one over here } proc_stmt.close(); rs.close(); con.close(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch (SQLException sqle) { sqle.printStackTrace(); } finally { /* try { proc_stmt.close(); rs.close(); con.close(); } catch (SQLException sqle) { sqle.printStackTrace(); } */ } } }
    Please correct me, if I am wrong at any point in my application..
    I would really appreciate for resolving my problem.
    Thanks,
    Manasi N.

    Hi jschell ,
    Firstly, I tried out with execute() and getMoreResults() to check if the statement is returning result set. - Its returning "null" only.
    Secondly, I tried with following one by one :
    1. Find a new jdbc driver
    2. Write a different stored procedure.I am using DB2 Express edition - DB2 v9.7.0.0
    I have the required jar files - i)db2jcc.jar ii) db2jcc_license_cu.jar
    From these I found the available jdbc drivers as -
    i) com.ibm.db2.jcc.DB2Driver
    ii) COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver
    iii) com.ibm.db2.jcc.uw.DB2StoredProcDriver
    I tried out my code by using each of these drivers, but still returning result set as null.
    Moreover, I changed my stored procedure which has cursor returning result set. In this case also, result set is null.
    Code snippet for this SP is -
    30             Class.forName("com.ibm.db2.jcc.uw.DB2StoredProcDriver");
    31             System.out.println("Class loaded....");
    32             con = DriverManager.getConnection
    33                 ("jdbc:db2://localhost:portno/dbName", "user", "password");
    34             System.out.println("Connection established....");
    35
    36             proc_stmt = con.prepareCall("call javaSP()");
    37            
    38             System.out.println("Called stored procedure....");
    39            
    40             proc_stmt.execute();
    41             //proc_stmt.executeUpdate();
    42             //rs = proc_stmt.getResultSet();
    43
    44             System.out.println("Query executed....");
    45            
    46             if ((proc_stmt.getMoreResults() == false) &&
    47                     (proc_stmt.getUpdateCount() == -1)) {
    48                 System.out.println("No more result sets");
    49             }o/p is (for every mentioned above jdbc driver) :-
    Class loaded....
    Connection established....
    Called stored procedure....
    Query executed....
    No more result sets..
    The o/p is always "No more result sets"
    What else can be tried out to retrieve the result set from stored procedure from Java application? And the most important, these same stored procedures are returning result sets on db2 server after calling them.
    Thank you,
    Manasi.N
    Edited by: Manasi.N on Apr 14, 2010 12:27 AM
    Edited by: Manasi.N on Apr 14, 2010 12:28 AM

  • Calling a report from a form based on procedure

    I created a form based on a procedure.
    It is a entry form where the user is selecting or enters data then on submit I must display the report based on selected data.
    I know I can simply create a report with all bind variable and do the job.
    My question is what is the syntax to call the report from the procedure for the selected parameters values.
    Thanks
    Lawrence

    If you want to display other HTML page after successful submission, you need to use
    either go or call method.
    I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
    the deptno. Here is my on successfull submission code:
    declare
    l_dept number;
    l_url varchar2(2000);
    begin
    l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
    l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='&#0124; &#0124;l_dept;
    go(l_url);
    end;
    null

  • Calling a PL/SQL Procedure from button and then return to same page

    I have a button called "Process" that I want to call the database stored procedure "BUILD_WORKDAYS" with parameters P14_PROCESS_YEAR as an input parameter. I have the button on the page but is this a PL/SQL Page Process or a PL/SQL Branch? I have tried a number of combination but don't seem to be able to get the database procedure to execute. What should the syntax be?
    Thanks

    "I have a button called "Process" that I want to call the database stored procedure "BUILD_WORKDAYS" with parameters P14_PROCESS_YEAR as an input parameter"
    Assuming you are starting with an empty Apex page:
    1) Create a region of some type or other, say HTML.
    2) Create a button of type "Create a button in region position" in this region. Sounds like you've already done this and called it PROCESS.
    3) Create a process of type PL/SQL, On Submit After Computations and Validations.
    4) Call it "Execute BUILD_WORKDAYS" (or whatever you like)
    5) The PL/SQL for the process is:
    BUILD_WORKDAYS(:P14_PROCESS_YEAR);
    6) Specify a success and failure message.
    7) In the final step of the Create Page Process wizard, select your button from the "When button pressed" select list.
    8) Then create an unconditional branch branching to the same page.
    That should be it.
    Andy

  • Calling Managed CLR Stored Procedure from C++ SQL Server 2008 fails with Msg 2809

    I am trying to call a stored procedure from C++ (VS 2010).
    Here is what the stored procedure looks like:
    public class Validate
    [Microsoft.SqlServer.Server.SqlProcedure(Name = "ClientTest")]
    public static void ClientTest(out String res )
    { res = "50";}
    To create a stored procedure I deploy at first the assembly
    USE [test]
    GO
    CREATE ASSEMBLY ClientTestAssembly
    AUTHORIZATION testLogin
    FROM 'C:\Users\test\Documents\Visual Studio 2010\Projects\TestCreationAssemblyCSharp\TestCreationAssemblyCSharp\bin\x64\Debug\TestCreationAssemblyCSharp.dll'
    and call 
    USE test
    GO
    CREATE PROCEDURE ClientTest (@res NVARCHAR(40) OUTPUT)
    AS
    EXTERNAL NAME ClientTestAssembly.Validate.ClientTest
    I can call my procedure direct in SQL Server Management Studio without any errors
    declare @res nvarchar(10)
    execute ClientTest @res OUTPUT
    print @res
    But when I try to call this procedure from C++ using CALL syntax
    SQLBindParameter(sqlstatementhandle, 1, SQL_PARAM_OUTPUT, SQL_C_CHAR,
    SQL_VARCHAR , 40, 0, version, sizeof(version) ,
    &pcbValue);
    res = SQLExecDirect(sqlstatementhandle, (SQLCHAR*)("{CALL ClientTest(?) }"), SQL_NTS);
    I get the Error 2809 with SQLSTATE 42000 and with statement 
    The request for 'ClientTest'
    (procedure) failed because 'ClientTest' is a procedure object.
    However, if I wrap my CLR stored procedure into a T-SQL stored procedure, like
    CREATE PROCEDURE myProc (@res NVARCHAR(40) OUTPUT)
    AS
    EXEC ClientTest @res OUTPUT
    and call then myProc instead of ClientTest
    res = SQLExecDirect(sqlstatementhandle, (SQLCHAR*)("{CALL myProc(?) }"), SQL_NTS);
    everithing works fine and I get 50 as result.
    I have no ideas what is the reason for that behavior.
    Thanks very much for any suggestion. 
    Christina

    I'm not an ODBC expert, but you might try following the sample here:
    Process Return Codes and Output Parameters (ODBC)
    To see if it also behaves differently for your CLR proc.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Calling Java Methods from Stored Procedures

    Can I call Java Methods from Oracle Stored Procedures? I have a Java framework that logs events and would like to reuse it for logging events that occur in stored procedures.
    null

    You need to publish java class methods to plsql.
    Attached below is some information.
    Although both PL/SQL modules and Java classes are stored in the database
    and are managed by many of the same mechanisms, each of them resides in
    its own namespace. Therefore, Java methods are not accessible from SQL
    and PL/SQL by default. In order to expose Java methods to the SQL and
    PL/SQL engines, first publish that Java method to the SQL namespace using
    a 'Call Spec'.
    Note: A 'Call Spec' does not create an additional layer of
    execution so there is no performance penalty incurred.
    A 'Call Spec' is simply a syntactical mechanism used to
    make a method known in the SQL namespace.
    The SQL name established by the 'Call Spec' can be top-level or packaged.
    The syntax differs only slightly and is consistent with that used for
    PL/SQL procedures and packages. For more information on the exact
    syntax, see the references listed in 'Related Topics'.
    In general, a top-level procedure 'Call Spec' takes the form:
    CREATE OR REPLACE PROCEDURE procname ( pname mode ptype, ... )
    AS LANGUAGE JAVA NAME 'javaname ( javatype, ... )';
    Where: procname is the SQL name you wish to publish
    pname is the name for a parameter to procname
    mode is the parameter mode (i.e. IN, OUT, IN OUT)
    ptype is a valid SQL type (e.g. NUMBER, CHAR, etc.)
    javaname is the fully qualified name of the Java method
    javatype is a Java type for the corresponding parameter
    Likewise, a top-level function 'Call Spec' takes the form:
    CREATE OR REPLACE FUNCTION fname ( pname mode ptype, ... ) RETURN rtype
    AS LANGUAGE JAVA NAME 'javaname ( javatype, ... ) return javatype';
    Where: fname is the SQL name you wish to publish
    rtype is the SQL return type of the function
    Note: Within the NAME clause, everything within quotes is case
    sensitive. For example, if the keyword 'return' is in all
    CAPS, this Call Spec will not compile.
    Other optional parts of this syntax have been omitted here for simplicity.
    Additional examples in subsequent sections illustrate some of these options.
    eg
    CREATE PROCEDURE MyProc (rowcnt IN NUMBER, numrows OUT NUMBER)
    AS LANGUAGE JAVA NAME 'MyClass.MyMethod(int, int[])';
    There are several important things to note here:
    1.) The 'Call Spec' for a JSP must be created in the same schema as the
    corresponding Java class that implements that method.
    2.) IN parameters are passed by value. This is the only parameter mode
    available in Java. OUT parameters, therefore, must be passed as single
    element arrays in order to emulate pass by reference.
    3.) Parameter names do not need to match, but the number and types of
    the parameters must match (with just one exception - see item 5 below).
    Oracle 8i supports conversions between an assortment of SQL and Java.
    See the references listed in 'Related Topics' for additional information.
    4.) Primitive types (e.g. int, float, etc.) are not required to be fully
    qualified with any package name. However, standard Java object types
    (e.g. String, Integer, etc.) as well as any user defined object types
    (e.g. like those generated by JPublisher) must be prefixed with a
    corresponding package name (e.g. java.lang) if applicable.
    5.) The 'main' method which takes a single String[] parameter can be
    mapped to any PL/SQL procedure or function which takes some number
    of VARCHAR2 or CHAR type IN parameters. For example, the java method:
    public static void main ( String[] args ) { ... }
    can be mapped to each of the following:
    PROCEDURE MyProc2 ( arg1 IN CHAR ) ...
    PROCEDURE MyProc3 ( arg1 IN CHAR, arg2 IN VARCHAR2 ) ...
    PROCEDURE MyProc4 ( arg1 IN VARCHAR2, arg2 IN VARCHAR2 ) ...
    and so forth. Parameters map to the corresponding element of the String
    array (e.g. arg1 -> args[0], arg2 -> args[1], etc.).
    null

  • How to call a PL/SQL procedure from a Java class?

    Hi,
    I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
    Can anyone let me know how to solve that problem?
    Thanks in advance,
    Chang Si Chou

    Have a look at this example:
    final ApplicationModule am = panelBinding.getApplicationModule();
    try
         final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
                                                                                         createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
         stmt.registerOutParameter(1, OracleTypes.VARCHAR);
         stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
         stmt.setString(3, "Test");
         stmt.execute();
         stmt.close();
         return stmt.getString(1);
    catch (Exception ex)
         panelBinding.reportException(ex);
         return null;
    }Hope This Helps

  • How to call a PL/SQL procedure from a xml Data Template

    We have a requirement in which we need to call a pl/sql package.(dot)procedure from a Data Template of XML Publisher.
    we have registered a Data Template & a RTF Template in the XML Publisher Responsibility in the Oracle 11.5.10 instance(Front End).
    In the Data Query part of the Data Template , we have to get the data from a Custom View.
    This view needs to be populated by a PL/SQL procedure.And this procedure needs to be called from this Data Template only.
    Can anybody suggest the solution.
    Thanks,
    Sachin

    Call the procecure in the After Parameter Form trigger, which can be scripted in the Data Template.
    BTW, there is a specialized XML Publisher forum:
    BI Publisher

Maybe you are looking for

  • CD/DVD drive is dead (+ some more)

    My CD/DVD combo drive is dead, and I'm looking for a do-it-yourself fix. Some important notes (maybe): -It started with a CD getting stuck in the tray during one of my many logic board freezes. When I restarted the computer, the CD wouldn't come out,

  • Saving a PDF document from a website

    When a bank has a document for you on its website, when you click the link a PDF document appears on the screen.  There isn't a menubar on the document, however when you hover the mouse cursor over the document, this toolbar appears It's obviously su

  • How to disable my ipod touch

    how do I disable my IPod Touch

  • NullPointerException parsing XML

    Hi, I am attempting to parse an xml document that is validated by a schema. The XML isn't a file, it comes from a database in a String, so I am trying this in my servlet: final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/sc

  • How to handle Chinese on WL 6.0 sp1

              Hi all,           I got a strange experience when i'm trying to handle chinese character in           JPS. I wrote a simple JSP (test.jsp) performing "FORM POST" to see whether i can           get the "right" chinese character after FORM PO