ADF call stored Oracle procedure - make transaction dirty

Hi all,
I have the next question:
my ADF application is doing massive data processing that I placed in Oracle stored procedure/package to improve performance.
Data processing takes 1-2 sec. I'm not doing any commit/rollback in my PL/SQL code.
I have "Save"/"Undo" button in the GUI and I want, that an end user to make corresponding action to commit/rollback data by pressing one of the buttons.
Normally those buttons are disabled since transaction is not dirty.
Is it possible to mark transaction dirty, so that "Save"/"Undo" buttons are available?
I know I can make buttons always available, but I not allowed to do so.
Are any other workarounds? Or can it be done in another proper way?
Thanks.
Alexander

Hi Timo!
well , good idea!
and I've already tried to fight with issue when I was getting transaction dirty by clicking on transient checkbox-attribute and tried to find a way to make a dirty transaction to clean :).
What do you think if I run something like:
this.saveButton.setDisabled(false);
this.undoButton.setDisabled(false);
after a call to stored procedure and use the next code
this.saveButton.setValueExpression("disabled",getValueExpression("#{!bindings.Commit.enabled}"));
this.saveButton.setValueExpression("disabled",getValueExpression("#{!bindings.Rollback.enabled}"));
in commit/Save & rollbak/Undo button handlers? Would it work?
Alexander

Similar Messages

  • How to call an Oracle Procedure and get a return value in Php

    Hi Everyone,
    Has anyone tried calling an Oracle procedure from Php using the ora functions and getting the return value ? I need to use the ora funtions (no oci)because of compatibility and oracle 7.x as the database.
    The reason why I post this here is because the ora_exec funtion is returning FALSE but the error code displayes is good. Is this a bug in the ora_exec funtion ?
    My code after the connection call is as follows:
    $cur = ora_open($this->conn);
    ora_commitoff($this->conn);
    $requestid = '144937';
    echo $requestid;
    $rc = ora_parse($cur, "begin p_ins_gsdata2
    (:requestid, :returnval); end;");
    if ($rc == true) {
    echo " Parse was successful ";
    $rc2 = ora_bind ($cur, "requestid", ":requestid", 32, 1);
    if ($rc2 == true) echo " Requestid Bind Successful ";
    $rc3 = ora_bind ($cur, "returnval", ":returnval", 32, 2);
    if ($rc3 == true) echo " Returnval Bind Successful ";
    $returnval = "0";
    $rc4 = ora_exec($cur);
    echo " Result = ".$returnval." ";
    if ($rc4 == false) {
    echo " Exec Returned FALSE ";
    echo " Error = ".ora_error($cur);
    echo " ";
    echo "ErrorCode = ".ora_errorcode($cur);
    echo "Error Executing";
    ora_close ($cur);
    The Oracle procedure has a select count from a table and it returns the number of records in that table. It's defined as:
    CREATE OR REPLACE procedure p_ins_gsdata2 (
    p_requestid IN varchar2 default null,
    p_retcode OUT varchar2)
    as
    BEGIN
    SELECT COUNT (*) INTO p_retcode
    FROM S_GSMRY_DATA_SURVEY
    WHERE request_id = p_requestid ;
    COMMIT;
    RETURN;
    END;
    Nothing much there. I want to do an insert into a table,
    from the procedure later, but I figured that I start with a select count since it's simpler.
    When I ran the Php code, I get the following:
    144937
    Parse was successful
    Requestid Bind Successful
    Returnval Bind Successful
    Result = 0
    Exec Returned FALSE
    Error = ORA-00000: normal, successful completion -- while
    processing OCI function OBNDRA
    ErrorCode = 0
    Error Executing
    I listed the messages on separate lines for clarity. I don't understand why it parses and binds o.k. but the exec returns false.
    Thanks again in advance for your help. Have a great day.
    Regards,
    Rudi

    retcode=`echo $?`is a bit convoluted. Just use:
    retcode=$?I see no EOF line terminating your input. Your flavour of Unix might not like that - it might ignore the command, though I'd be surprised (AIX doesn't).
    replace the EXEC line with :
    select 'hello' from dual;
    and see if you get some output - then you know if sqlplus commands are being called from your script. You didn't mentioned whether you see the banner for sqlplus. Copy/paste the output that you get, it will give us much more of an idea.

  • Calling a oracle procedure within a procedure - Urgent

    Hi
    Can some one tell me, how to call a oracle procedure within a procedure ?
    Thanks
    Murali

    You could always try looking in the manuals.

  • Calling stored java-procedure in Oracle9i Lite from ODBC

    I've got a problem:
    I try to call a stored java-procedure through ODBC. The stored
    java-procedure in Oracle 9i Lite is called successfully from
    server console (MSQL). When I call my stored java-procedure from
    my web-application (ASP) through ODBC connection (ODBC drivers
    are from Oracle 9i Lite set V3.51) the server returns an error
    (Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [POL-
    8000] could not start the Java Virtual Machine),
    however 'select' without java-procedure calls works
    successfully. PATH and CLASSPATH variables are properly set up.
    File jvm.dll is present.
    Can anybody help me?

    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 a oracle procedure with in/out parameter frm unix shell script?

    Hi,
    I need to call an oracle stored procedure from unix script. The procedure has 1 input parameter and 2 output parameter. Please send me the syntax for the same. Based on the output values of procedure, I have to execute some more commands in unix script.
    Thanks and regards
    A

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • On making call to Oracle procedures from Java, Value becomes null on oracle

    We are using some user defined Oracle data types in my Java/J2EE application
    and some of them are Oracle collections(ex. VARRAY).
    We are making a call to Procedures/Functions from Java, there are some
    parameters of user defined data types declared in the
    procedures/functions, from java the values are properly setting to these
    user defined data type parameters and sending to Procedures.
    We are not getting any exception at Java side and Oracle side and values
    are becoming blank/null at oracle procedure side for the parameters of
    user defined data types.
    But when do the count of collection of user defined data type then it is
    properly giving the size of collection(VARRAY).
    When we are trying to read the values from the collection(VARRAY) it is
    giving blank/null value and there is no exception.
    Please let me know if you have any suggestion on this?

    user7671994 wrote:
    When we are trying to read the values from the collection(VARRAY) it is
    giving blank/null value and there is no exception.If you are talking about VARCHAR2 parameters of the objects - then you should add orai18n.jar to classpath.

  • Handling a List returned from a Stored Oracle Procedure

    I'm trying to put a PL/SQL oracle wrapper around some post code lookup
    software.
    We're planning to get the wrapper to return a List and then JDBC to handle this list.
    Has anyone already done/attempted to do this? Does anyone know if it can be done using a List and can oracle stored procedures return a List?

    It appears that Oracle does support an array type:
    In Oracle
    CREATE OR REPLACE FUNCTION getEmpArray RETURN EMPARRAY
    AS
    l_data EmpArray := EmpArray();
    CURSOR c_emp IS SELECT ename FROM EMP;
    BEGIN
    FOR emp_rec IN c_emp LOOP
    l_data.extend;
    l_data(l_data.count) := emp_rec.ename;
    END LOOP;
    RETURN l_data;
    END;
    In Java
    public static void main( ) {
      OracleCallableStatement stmt =(OracleCallableStatement)conn.prepareCall
                    ( "begin ? := getEMpArray; end;" );
        // The name we use below, EMPARRAY, has to match the name of the
        // type defined in the PL/SQL Stored Function
        stmt.registerOutParameter( 1, OracleTypes.ARRAY,"EMPARRAY" );
        stmt.executeUpdate();
        // Get the ARRAY object and print the meta data assosiated with it
        ARRAY simpleArray = stmt.getARRAY(1);
        System.out.println("Array is of type " +  simpleArray.getSQLTypeName());
        System.out.println("Array element is of type code "+simpleArray.getBaseType());
        System.out.println("Array is of length " + simpleArray.length());
        // Print the contents of the array
        String[] values = (String[])simpleArray.getArray();
        for( int i = 0; i < values.length; i++ )
          System.out.println( "row " + i + " = '" + values[i] +"'" );
    This was taken from:
    http://otn.oracle.com/sample_code/tech/java/codesnippet/jdbc/varray/index.html

  • Call stored procedure with OUT parameter

    Hello,
    I have created a short-lived process. Within this process I am using the "FOUNDATION > JDBC > Call Stored Procedure" operation to call an Oracle procedure. This procedure has 3 parameters, 2 IN and 1 OUT parameter.
    The procedure is being executed correctly. Both IN parameters receive the correct values but I am unable to get the OUT parameter's value in my process.
    Rewriting the procedure as a function gives me an ORA-01460 since one of the parameters contains XML (>32K) so this is not option...
    Has someone been able to call a stored procedure with an OUT parameter?
    Regards,
    Nico

    Object is Foundation, Execute Script
    This is for a query, you can change to a stored procedure call. Pull the value back in the Java code then put into the process variable.
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import java.sql.*;
    PreparedStatement stmt = null;
    Connection conn = null;
    ResultSet rs = null;
    try {
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("java:IDP_DS");
    conn = ds.getConnection();
    stmt = conn.prepareStatement("select FUBAR from TB_PT_FUBAR where PROCESS_INSTANCE_ID=?");
    stmt.setLong(1, patExecContext.getProcessDataLongValue("/process_data/@inputID"));
    rs = stmt.executeQuery();
    rs.next();
    patExecContext.setProcessDataStringValue("/process_data/outData", rs.getString(1));
    } finally {
    try {
    rs.close();
    } catch (Exception rse) {}
    try {
    stmt.close();
    } catch (Exception sse) {}
    try {
    conn.close();
    } catch (Exception cse) {}

  • Help in calling sql loader and an oracle procedure in a script

    Hi Guru's
    please help me in writing an unix script which will call sql loader and also an oracle procedure..
    i wrote an script which is as follows.
    !/bin/sh
    clear
    #export ORACLE_SID='HOBS2'
    sqlldr USERID=load/ps94mfo16 CONTROL=test_nica.ctl LOG=test_nica.log
    retcode=`echo $?`
    case "$retcode" in
    0) echo "SQL*Loader execution successful" ;;
    1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
    2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
    3) echo "SQL*Loader execution encountered a fatal error" ;;
    *) echo "unknown return code";;
    esac
    sqlplus USERID=load/ps94mfo16 << EOF
    EXEC DO_TEST_SHELL_SCRIPT
    it is loading the data in to an oracle table
    but the procedure is not executed..
    any valuable suggestion is highly appriciated..
    Cheers

    multiple duplicate threads:
    to call an oracle procedure and sql loader in an unix script
    Re: Can some one help he sql loader issue.

  • Please help to call oracle procedure with out paramter from shell script

    Hi
    I want to call a process with out parameter from shell script. I am calling process in shell script in below way
    function Process_loads {
    ( echo 'set serveroutput on size 1000000 arraysize 1'
    echo "set pagesize 0 term on verify off feedback off echo off"
    echo "BEGIN"
    echo " dbms_output.put_line('Before Calling The package'); "
    echo " x ( '$1', '$2', '$2', '$4', '$5', '$error_code'); "
    echo " dbms_output.put_line('After Calling The package'); "
    echo "EXCEPTION "
    echo " WHEN OTHERS THEN "
    echo " dbms_output.put_line('BIN_LOAD_ERROR' || SQLERRM); "
    echo " ROLLBACK;"
    echo "END;"
    echo "/" ) | sqlplus -s $USER/$PASSWORD@$SID
    Here $error_code is out paramter. All varaibles passed in process are declared with export command.
    When executing .sh it gives below error
    "sh ERROR at line 3: ORA-06550: line 3, column 99: PLS-00363: expression '' cannot be used as an assignment target ORA-06550: line 3, column 3: PL/SQL: Statement ignored".
    Please help to get rid from this error or please suggest how to call a oracle procedure with out paramter from unix shell script.
    Thanks in advance

    You can try this:
    From sql*plus
    SQL> ed
      1  create or replace procedure my_proc(p_id in int, p_result out int)
      2  as
      3  begin
      4  select 10 * p_id
      5  into p_result
      6  from dual;
      7* end my_proc;
    SQL> /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2  v_r int;
      3  begin
      4  my_proc(10,v_r);
      5  dbms_output.put_line(v_r);
      6  end;
      7  /
    100
    PL/SQL procedure successfully completed.
    from bash:
    testproc.sh:
    #!/bin/bash
    (echo 'set serveroutput on';
    echo 'declare';
    echo 'v_r int;';
    echo 'begin';
    echo 'my_proc(10,v_r);';
    echo 'dbms_output.put_line(v_r);'
    echo 'end;';
    echo '/';) | sqlplus -s u1/u1
    Console:
    oracle@mob-ubuntu:~$ chmod u+x testproc.sh
    oracle@mob-ubuntu:~$ ./testproc.sh
    100
    PL/SQL procedure successfully completed.With kind regards
    Krystian Zieja

  • Calling Oracle Procedure in Parallel

    Is it Possible to call two Oracle Procedures in Parallel.
    Begin
    call Procedure a;
    call Procedure b;
    end;
    When I will run the above block, I want that Oracle will call the Procedure a and then oracle will not wait for the procedure a to complete, Oracle will call procedure b, The procedure a and b both are called in parallel.
    Is it possible ? If possible How ?
    Thanx in advance.

    Please check the link -
    http://www.devx.com/dbzone/10MinuteSolution/20902/1954?pf=trueh
    http://forums.oracle.com/forums/search.jspa?threadID=&q=parallel+execution+of+procedure&objID=f75&dateRange=all&userID=&numResults=15
    Regards.
    Satyaki De.

  • How to call Oracle Procedure into ODI

    Hi,
    I'm using ODI 10g.
    Before executing the interface in a package i wanted to place my Procedure.
    I created following procedure in d/b (target)
    CREATE OR REPLACE PROCEDURE TEST_MY_NEW_PROCE
    AS
    BEGIN
    DELETE FROM EMPLOYEE_TABLE
    WHERE EMPLOPYEE_ID LIKE 'P%';
    COMMIT;
    END;
    The Procedure is working fine in target database.
    Now, before executing my interface i would like to run this procedure in my package. So, can some one please help me how to call this oracle procedure (Created in Target schema) into ODI and run this.
    thank you.

    Hi GRK,
    You can create an ODI procedure, add a single step, choose Oracle as Technology and your target schema.
    Then just call it through a pl/sql block :
    BEGIN
    TEST_MY_NEW_PROCE;
    END;Then drag this ODI procedure in your package.
    Regards,
    JeromeFr

  • How to call a Oracle Proc,which contains Object Type as in Param, from java

    Hi
    Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.
    Here is my code will look like...
    1. CREATE OR REPLACE TYPE emp AS OBJECT
    Empno NUMBER,
    Ename VARCHAR2(50)
    [COLOR=royalblue]In step1 I have created object type.[COLOR]
    2.CREATE OR REPLACE PACKAGE ref_pkg IS
    TYPE tab_emp IS TABLE OF emp;
    END ref_pkg;
    [COLOR=royalblue]In step2,I have created a table type which is of type emp;[COLOR]
    3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
    BEGIN
    FOR I IN 1..p_emptab.COUNT
    LOOP
    Some code written here
    END LOOP;
    END;
    [COLOR=royalblue]In step3 I have passed tabletype which is of type emp as argument.[COLOR]
    Now I need to invoke this procedure from JAVA.
    Calling a procedure doesn�t matter.
    But how I can map objecttype ? how will java recognize oracle object ?
    How can I implement this ?
    Any Help/Clues is Appreciated.
    Thanks
    Krishna

    Hi Bob
    You can call a stored proc from a database control with the jc:sql annotation itself.
    Assume a stored proc taking one In parameter
    * @jc:sql statement="call sp_updateData({id})"
    void call_sp_updateCust(int id);
    You can even call stored proc with OUT parameters using
    * @jc:sql statement="{call sp_MyProc(?, ?)}"
    void call_sp_MyProc(SQLParameter[] params)
    You can also call stored functions via db control.
    More info and diff ways to call at
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Thanks
    Vimala

  • How can I call a function/procedure in VBA?

    Hallo,
    can somebody help me with this topic? I have vba-code and wanna call a oracle-procedure/function. Does this work? And how does this work?
    Thanks, Katrin

    Hallo,
    now I tried to reach my aim with a procedure and a trigger but I get error-messages.
    create or replace procedure updateNutzGeo (objnr integer, kat integer) AS
    sqlStmt varchar2(500);
    begin
    sqlStmt := 'UPDATE NUTZUNG SET GEOMETRIE=(SELECT F'||Kat||'_GEOM FROM UG_F'||Kat||'_GEOM F, Nutzung N WHERE N.OBJNR='||Objnr||' AND F.F'||Kat||'_OBJNR='||Objnr||' AND GETFEATUREID(F.F'||Kat||'_FID) IN(SELECT MSLINK FROM FEATURE WHERE FCODE like '%0000')) WHERE N.Objnr='||Objnr||'';
    EXECUTE IMMEDIATE sqlStmt;
    end;
    create or replace trigger update_nutz_geo_aft_upd
    before insert or update on nutzung
    for each row
    begin
    updateNutzGeo(:new.objnr,:new.kategorie);
    end;
    The error-messages I get:
    ORA-00904: invalid columnname
    ORA-06512: in "pilot.updatenutzgeo", line 5
    ORA-06512: in "pilot.Update_Nutz_geo_Aft_Upd", line2
    ORA-04088: Error while execution of trigger pilot.update_nutz_geo_aft_upd
    Any help?

  • Calling stored procedures from oracle ADF

    hi all ,
    is there any way to call stored procedures form oracle ADF...... kindly help me....

    Thanks Dear ! i also got it from JDeveloper Help with topic About Using Stored Procedures
    and it is very brief with code and example...... and the link you forward to me is very valuable for me ... Thanks again.....

Maybe you are looking for

  • Personal Data: sucess messages - change messages

    Hi experts, My client is implementing ESS and they want to change the sucess message when employee saves new data. The standard message is: The changes you made to your Address data were saved  Is there any way to change this messages? Can it be chan

  • Mailing ALV report OUTPUT

    Hi Experts, Can you give an example program on mailing ALV report output to any ID. Thanks in advance. Regards, Ram

  • IPad using Kindle App and Dictionary

    I am using the Kindle App on my iPad and like the dictionary function there. I am reading books in english and italian and wonder if there is a way to change the dictionary so that I get english with english and italian with italian. I downloaded an

  • File size and quality of images from iphone to mac to exported jpeg

    there is a lot of  good info on this forum regarding jpeg compression, iphoto export etc but i want to confirm a couple things.. i have 'my photo stream' enabled so that i can upload my iphone photos to my mac and my plan is to use iphoto (im just st

  • Help! Need to override Page Down/Page Up in JList

    Help! Need to override Page Down/Page Up in JList... PgUp PgDn selects the top or bottom item in a Jlist when JList is in focus. I want PgUp and PgDn to do something different (which it does), but it still selects top or bottom items. How do I COMPLE