HTTP - Calling a PL/SQL Function

I am wanting to call a PL/SQL Function over the web.
Say if I am using Oracle APEX and my user is the standard "HR".
How would I call a function from PL/SQL made by the user HR called EXAMPLE_FUNCTION.

It depends on where you want to call the function. Easiest method would be to create a region based on the PLSQL function.
If you want to do some plsql function after the page is rendered, then you should find out the event for the field such as onchange or onblurr and call
a Javascript. The javascript can cal the plsql function...
Also note that under the database forums there is a forum for Apex and u can see many samples
Rajesh

Similar Messages

  • Calling a PL/SQL function from java

    I would like to call a pl/sql function from java. My pl/sql function is taking arrays of records as parameters. How do i proceed? Which specific oracle packages do I have to import?
    Please send an example.
    TIA,
    Darko Guberina

    Documentation here: http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref185
    says JPublisher can publish records too.
    But when I change the example given at http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref190 as following:
    PACKAGE "COMPANY" AS
    type emp_rec is record (empno number, ename varchar2(10));
    type emp_list is varray(5) of emp_rec;
    type factory is record (
    name varchar(10),
    emps emp_list
    function get_factory(p_name varchar) return factory;
    END;
    then I see <unknown type or type not found> at sql or java files generated. Any ideas?

  • SQL report region source to call a pl/sql function using DB link

    Hi - I have a pl/sql function fn_dbtype(id NUMBER) defined in database X. The pl/sql function executes couple DML statements and returns a string (a SELECT query). I am able to call this function using SQL Plus (Connected to Database X) as below and it works fine:
    declare
    vSQL VARCHAR2(100);
    begin
    vSQL := fn_dbtype(1);
    end;
    The DML operations completed fine and vSQL contains the "Select" query now.
    In APEX:
    I am trying to create a SQL report in APEX using SQL query(PL/SQL function returning a sql statement) option. I am trying to figure out what to put in the region source so that the output of the "Select" query is displayed in the report.
    Moreover APEX is hosted in a different database instance. So I would need to call this pl/sql function using a DB Link.
    Please let me know what I need to put in the region source to execute the pl/sql function which returns the "Select" query thereby displaying the query output in the report. Thanks.
    Edited by: user709584 on Mar 19, 2009 2:32 PM
    Edited by: user709584 on Mar 19, 2009 2:34 PM

    try something like this:
    return fn_dbtype(1)@dblink;

  • Need to obtain updateable ResultSet via call to PL/SQL function

    I'm using JDBC and the Oracle JDBC driver to call a PL/SQL function that returns a SYS_REFCURSOR. I do this via a CallableStatement object and then cast the output parameter to a ResultSet object. However, I want this ResultSet object I end up with to be updateable. The following code throws an exception stating "Invalid operation for read only resultset: updateString ":
    cstmt2 = con.prepareCall("{? = call get_upload_entry_for_update(?)}",
                             ResultSet.TYPE_FORWARD_ONLY,
                             ResultSet.CONCUR_UPDATABLE);
    cstmt2.registerOutParameter(1, OracleTypes.CURSOR);
    cstmt2.setInt(2, newUploadId);
    cstmt2.execute();
    rs = (ResultSet) cstmt2.getObject(1);
    rs.next();
    rs.updateString("UPLOAD_FILENAME", fileName);
    // . . .So even though, I create the CallableStatement such that ResultSets should be updateable, it's not allowing me to do any updates. Also, in case you're wondering, inside the PL/SQL function, the query on which the cursor is based is a select statement which does specify "for update" at the end.
    I can get it to work as follows using a Statement object that executes the SELECT statement directly instead of a CallableStatement that executes a PL/SQL function:
    Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
    rs = stmt.executeQuery("select UPLOAD_FILENAME, UPLOAD_FILE from rf_upload where upload_id = "+newUploadId+" for update");
    rs.next();
    rs.updateString("UPLOAD_FILENAME", fileName);
    //. . . Although this works, the project I'm working has a goal to encapsulate all SQL into Functions and Stored Procedures so I'd like to get it working that way instead.
    So the bottom-line question is: Using the Oracle JDBC driver, how can I call a PL/SQL function in such a way that I can obtain an updateable ResultSet object?
    Thanks for any suggestions. I'd be happy to clarify anything that's unclear.

    Hmmm...
    I'm still scratching my head about this one, just not sure it's doable, but I'll point out something, maybe it will give you a clue...
    In your code, you have:
    cstmt2 = con.prepareCall("{? = call get_upload_entry_for_update(?)}",
                             ResultSet.TYPE_FORWARD_ONLY,
                             ResultSet.CONCUR_UPDATABLE);I don't think the ResultSet parameters do anything towards your goal of getting an updatable result set via the returned cursor, those parameters affect the result set produced if you were to call:
    ResultSet rs2 = cstmt2.executeQuery();and not the result set generated by:
    rs = (ResultSet) cstmt2.getObject(1);Futhermore, while the "FOR UPDATE" is almost certainly something you want to do, it also doesn't affect the cursor (I think) but merely locks the affected rows in the DB.
    You might try calling rs.getType() and rs.getConcurrency() on the ResultSet you get from getObject, though I suspect they'll merely confirm the bad news that the cursor your getting back isn't right...
    You also might try the Oracle-specific getCursor call:
    rs = ((OracleCallableStatement)cstmt2).getCursor (1)instead of getObject, though I don't think it will help...
    I've been curious enough to dig around through most of my handy references and Oracle's docs and MetaLink and come up mostly empty, although almost 5 years ago Oracle Support said:
    " Reference Cursors from a pl/sql stored procedure are not updateable in any language."

  • Calling a pl/sql function.

    Hi,
    I couldn't manage to call a pl/sql function that takes some arguments or no arguments.
    I couldn't find an example but searching through previous topics / discussions I could write something like this :
    ExpressionBuilder expBuilder = new ExpressionBuilder();
    Vector args = new Vector();
    Vector parameters = new Vector();
    // dynamically fill these vectors if there are any arguments to the function
    Expression exp = expBuilder.getFunctionWithArguments(functionName, args);
    DataReadQuery query = new DataReadQuery();
    query.setSelectionCriteria(exp);
    Iterator iter = args.iterator();
    while (iter.hasNext())
    query.addArgument((String)iter.next());
    Object obj = getActiveUnitOfWork().executeQuery(query, parameters);
    at the end what I get is NullPointerException, probably I'm missing something.
    UnitOfWork(17384)--#executeQuery(DataReadQuery())
    UnitOfWork(17384)--java.lang.NullPointerExceptionjava.lang.NullPointerException
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.setCallFromStatement(Unknown Source)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.prepareExecuteSelect(Unknown Source)
         at oracle.toplink.queryframework.DataReadQuery.prepare(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at com.vnu.publitec.axis.toplink.PersistenceProvider.executeStoredProc(PersistenceProvider.java:420)
         at com.vnu.publitec.axis.dispatcher.AxisDispatcherLocalImpl.executeStoredProc(AxisDispatcherLocalImpl.java:280)
         at com.vnu.publitec.axis.dispatcher.AxisSessionBean.executeStoredProc(AxisSessionBean.java:215)
         at AxisSessionBeanRemote_StatefulSessionBeanWrapper0.executeStoredProc(AxisSessionBeanRemote_StatefulSessionBeanWrapper0.java:501)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:536)

    You must use SQL with DataReadQuery, you cannot use expressions. Since a single value is returned the ValueReadQuery can be used to filter the result.
    Example:
    ValueReadQuery query = new ValueReadQuery("Select My_func(#arg1, #arg2) from dual");
    query.addArgument("arg1");
    query.addArgument("arg2");
    Vector arguments = new Vector(2);
    arguments.add("1");
    arguments.add("2");
    Object result = session.executeQuery(query, arguments);
    or,
    Vector result = session.executeSelectingCall(new SQLCall("select my_func(1, 2) from dual"));

  • Call a pl/sql function froma jsp

    I need to call an pl/sql function which basically returns true or false depending on the count. based on the return value I have to alert a message. how can i call the pl/sql fucntion in a jsp?
    thanks for ur help.

    You call the function the same way you would from anywhere, although i don't recommend you call database functions directly from a JSP page as it's bad form.

  • Calling stored pl/sql functions

    Hello,
    Any suggestions on calling a stored pl/sql function from a UIX page and returning the output of the function to the same page?
    Thanks,
    -Jeff

    Hi Jaap,
    I followed the instructions on the link you gave me and when I ran my test application I received this error:
    C:\jdev903\jdk\bin\javaw.exe -ojvm -classpath C:\msdapp_jeff\web\WEB-INF\classes;C:\msdapp_jeff\web\WEB-INF\lib\CopyProjectLibs.bat;C:\msdapp_jeff\web\WEB-INF\lib\bc4jmt.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jct.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jdomorcl.jar;C:\msdapp_jeff\web\WEB-INF\lib\collections.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jdatum.jar;C:\msdapp_jeff\web\WEB-INF\lib\classes12.jar;C:\msdapp_jeff\web\WEB-INF\lib\nls_charset12.jar;C:\msdapp_jeff\web\WEB-INF\lib\xmlparserv2.jar;C:\msdapp_jeff\web\WEB-INF\lib\uix2-dbg.jar;C:\msdapp_jeff\web\WEB-INF\lib\share-dbg.jar;C:\msdapp_jeff\web\WEB-INF\lib\regexp.jar;C:\msdapp_jeff\web\WEB-INF\lib\cle.jar;C:\msdapp_jeff\web\WEB-INF\lib\jhsruntime.jar;C:\jdev903\BC4J\lib\bc4jmt.jar;C:\jdev903\BC4J\lib\collections.jar;C:\jdev903\BC4J\lib\bc4jct.jar;C:\jdev903\lib\xmlparserv2.jar;C:\jdev903\jlib\jdev-cm.jar;C:\jdev903\j2ee\home\lib\jndi.jar;C:\jdev903\BC4J\lib\bc4jdomorcl.jar;C:\jdev903\BC4J\jlib\bc4jdatum.jar;C:\jdev903\jdbc\lib\classes12.jar;C:\jdev903\jdbc\lib\nls_charset12.jar;C:\jdev903\jlib\jdev-cm.jar;C:\jdev903\jdev\lib\jdev-rt.jar;C:\jdev903\BC4J\jlib\bc4jtester.jar;C:\jdev903\jlib\jdev-cm.jar;C:\jdev903\lib\xmlparserv2.jar;C:\jdev903\jlib\help4-nls.jar;C:\jdev903\jlib\help4.jar;C:\jdev903\jlib\share.jar;C:\jdev903\jlib\jewt4-nls.jar;C:\jdev903\jlib\jewt4.jar;C:\jdev903\jlib\oracle_ice5.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jct.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jdatum.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jdomorcl.jar;C:\msdapp_jeff\web\WEB-INF\lib\bc4jmt.jar;C:\msdapp_jeff\web\WEB-INF\lib\classes12.jar;C:\msdapp_jeff\web\WEB-INF\lib\cle.jar;C:\msdapp_jeff\web\WEB-INF\lib\collections.jar;C:\msdapp_jeff\web\WEB-INF\lib\jhsruntime.jar;C:\msdapp_jeff\web\WEB-INF\lib\nls_charset12.jar;C:\msdapp_jeff\web\WEB-INF\lib\regexp.jar;C:\msdapp_jeff\web\WEB-INF\lib\share-dbg.jar;C:\msdapp_jeff\web\WEB-INF\lib\uix2-dbg.jar;C:\msdapp_jeff\web\WEB-INF\lib\xmlparserv2.jar;C:\jdev903\lib\xmlparserv2.jar;C:\jdev903\jlib\regexp.jar;C:\jdev903\jlib\share.jar;C:\jdev903\jlib\uix2.jar;C:\jdev903\j2ee\home\lib\ojsp.jar;C:\jdev903\j2ee\home\jsp\lib\taglib\ojsputil.jar;C:\jdev903\j2ee\home\oc4j.jar;C:\jdev903\j2ee\home\lib\servlet.jar;C:\jdev903\jdev\lib\ojc.jar;C:\jdev903\BC4J\lib\bc4jhtml.jar;C:\jdev903\BC4J\lib\datatags.jar;C:\jdev903\BC4J\lib\bc4juixtags.jar;C:\jdev903\BC4J\lib\bc4j_jclient_common.jar -Djbo.project=empdep0 -Dhttp.proxyHost=http -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=*.oasas.state.ny.us test.test
    oracle.jbo.JboException: STRINGMANAGER: StringManager oracle.jbo.common.CommonMessageBundle (33001) exception oracle.jbo.NoXMLFileException: JBO-26001: XML File not found for the Container empdep0.jpx
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:301
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
              Configuration.java:1090
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String)
              Configuration.java:1073
         void test.test.main(java.lang.String[])
    I'm pretty clueless on this one. What do you think?
    -Jeff

  • For each row of a table call a pl/sql function

    Hi,
    i have a search form in adf like this:
    parameter1:___
    parameter2:____
    buttonSearch
    Table with results
    field1 field2 field3
    row1 ------ --------- -------
    row2 ------ --------- -------
    row3 ------ --------- -------
    The user inputs the parameters 1 and 2 then press buttonSearch and the query execute and returns rows 1 to 3.
    What i need is for each row call pl/sql function and passed the parameter 1 and 2 and field 1 to 3 (plsql function recives 5 parameters (parameter1, parameter2, field1 , field2 and field3) )
    my buttonSearch call a java class that execute ExecuteWithParamters method.
    I create the call to my plsql function on Application module class and then export as a java interface.
    So i have the function to use in the viewcontroller layer, but i don't know where to use it, and how to pass the paramters: the parameter 1 and 2 that user inputs and the row fields.....
    any ideas....
    thanks!!

    Hi,
    for this you need to call the PLSQL function upon table rendering, which means that you need a field in the table referencing a managed bean. In the managed bean you can use #{row} and resolve it using a ValueExpression. #{row} gives you access to the current rendered row (this is why you need to do it when the table renders) and thus allows you to call getAttribute(name) to get the values of field 1 - 3. The search field value you should get through the bindings reference (assuming the search form uses ADF). Then you create an operation binding for the executeWithParameters and call operationBindingName.getParamsMap().put(argname, argvalue); on it.
    Frank
    Ps.: I am concerned about the performance you get and wonder if it isn't possible to create a transient attribute that executes the function and displays the results. As I understand, the search parameters are only to filter the result set, which you still can do

  • Calling a PL/SQL function in the SQL statement

    I have a PL/SQL function which i should call in a SQL statement.
    Let's say the function is func1(parameter1,parameter2),
    it should be called like this :- SELECT func1() FROM mytable ;
    Can any one help me out on this ?
    ---Thanx in advance

    you can call pl/sql functions from pl/sql using
    select fn1('param1','param2') from table;
    if you dont want to pass paramters, you have to specify default
    value while creating function like below
    create function fn1(p1 number default null,p2 varchar2 default
    null) return...
    now you can call using
    select fn1 from table;

  • How to use sql call a pl/sql function

    Hi there,
    I have a pl/sql function package as below:
    Create or Replace package test10 as
    P_DESFORMAT VARCHAR2(10);
    DESFORMAT VARCHAR2(10);
    function m_tot_u1Formula(m_o_uns number,m_t_uns number,m_v_uns number)return NUMBER ;
         function m_tot_res1Formula(m_o_res number,m_t_res number)return NUMBER;
         function m_occ_u1Formula(m_o_uns number,m_t_uns number)return NUMBER ;
         function m_onrpun1Formula(m_o_uns in number,m_o_res in number)return NUMBER ;
         function m_tenpun1Formula(m_t_res in number,m_t_uns in number)return NUMBER ;
         function m_occpun1formula(m_occ_u in number, m_tot_res in number) return number ;
         function m_vac_rate1formula(m_v_uns in number,m_tot_u in number) return number;
         function m_onrpha1Formula(m_o_res in number,m_area in number) return NUMBER;
         function m_tenpha1Formula(m_t_res in number,m_area in number)return NUMBER ;
         function m_occpha1Formula(m_area in number,m_tot_res in number)return number;
         function P_DESFORMATValidTrigger return boolean;
    END test10;
    CREATE OR REPLACE PACKAGE BODY test10 AS
    function m_tot_u1Formula(m_o_uns number,m_t_uns number,m_v_uns number)return NUMBER is
    begin
    RETURN m_o_uns + m_t_uns + m_v_uns;
    end;
    function m_tot_res1Formula(m_o_res number,m_t_res number)return NUMBER is
    begin
    RETURN m_o_res + m_t_res;
    end;
    function m_occ_u1Formula(m_o_uns number,m_t_uns number)return NUMBER is
    begin
    RETURN m_o_uns + m_t_uns;
    end;
    function m_onrpun1Formula(m_o_uns in number,m_o_res in number)return NUMBER is
    begin
    IF m_o_uns > 0 THEN
    RETURN m_o_res / m_o_uns;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_tenpun1Formula(m_t_res in number,m_t_uns in number)return NUMBER is
    begin
    IF m_t_uns > 0 THEN
    RETURN m_t_res/m_t_uns;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_occpun1formula(m_occ_u in number,m_tot_res in number) return number is
    begin
    IF m_occ_u > 0 THEN
    RETURN m_tot_res / m_occ_u;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_vac_rate1formula(m_v_uns in number,m_tot_u in number) return number is
    begin
    IF m_tot_u > 0 THEN
    RETURN 100 * m_v_uns / m_tot_u;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_onrpha1Formula(m_o_res in number,m_area in number) return NUMBER is
    begin
    IF m_o_res > 0 THEN
    RETURN m_o_res / m_area;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_tenpha1Formula(m_t_res in number,m_area in number)return NUMBER is
    begin
    IF m_t_res > 0 THEN
         RETURN m_t_res / m_area;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_occpha1Formula(m_area in number,m_tot_res in number)return number is
    begin
    IF m_area > 0 THEN
    RETURN m_tot_res / m_area;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function P_DESFORMATValidTrigger return boolean is
    begin
    DESFORMAT := P_DESFORMAT;
    return (TRUE);
    end;
    END test10 ;
    the package is compiled successfully.
    And my sql statement will call those function in this package such as:
    select test10.m_tot_u1Formula(m_o_uns ,m_t_uns ,m_v_uns) m_tot_u,
    test10.m_tot_res1Formula(m_o_res,m_t_res)m_tot_res,
    test.m_occ_u1Formula(m_o_uns ,m_t_uns)m_occ_u,
    test10.m_onrpun1Formula(m_o_uns ,m_o_res )m_onrpun,
    test10.m_tenpun1Formula(m_t_res ,m_t_uns )m_tenpun,
    test10.m_occpun1formula(:m_occ_u , :m_tot_res )m_occpun,
    test10.m_vac_rate1formula(m_v_uns ,m_tot_u ) m_vac_rate,
    test10.m_onrpha1Formula(m_o_res ,m_area ) m_onrpha,
    test10.m_tenpha1Formula(m_t_res ,m_area ) m_tenpha,
    test.m_occpha1Formula(m_area , :m_tot_res ) m_occpha
    from ..... where.....
    Is it right to call those functions? Thanks in advance.
    Appcat

    I spoke too soon on the impracticality of a function-based index on a view. My recollection was that the CBO wasn't smart enough to recognize that a FBI on an expression like (col1*col2) could be used to resolve queries that involved a simple transform (i.e. col2*col1), which tended to force you to have a user-defined function behind the FBI to make sure that someone cleaning up code didn't accidentally make the index unusable. Now that I've actually tested it, my recollection, at least on 10.2, is clearly incorrect.
    There's certainly a matter of personal taste here. If I knew what these variables were intended to represent, I'd have no problem maintaining either syntax because it should be relatively obvious whether either piece of code is suspect. I do have to confess that I had to look up the syntax for the NULLIF function yesterday in order to reply to this thread-- my wager is that if I had to look it up, a good fraction of the PL/SQL programmers out there would have had to look it up as well and might not immediately recognize this as an inverted division by 0 test.
    From a maintenance standpoint, I would personally rather have the package where I can zoom in on the particular function I'm interested in, rather than looking at a view that may be doing a dozen rather similar calculations. I'm a bit more confident that I (or some new maintenance programmer on my team) could change the logic in the function without inadvertently screwing up any of the other functions in the package than I would be that I (or they) would accidentally screw up the view. Clearly, robust test scripts and an automated test suite would help tremendously in either case, and neither change should be too difficult, but my experience is that the package is the easier construct to modify or add to. I certainly believe that other people/ organizations would have different experiences and other people might prefer the view approach. I certainly wouldn't oppose a view-based approach, just as I wouldn't oppose a package.
    There's also still the matter of having a table with every valid input if a view is to be practical. It's certainly possible that such a table exists, but it seems equally possible that there are either many such tables, that these functions are doing calculations on values that aren't stored in tables, etc., in which case a package would be the better solution.
    Justin

  • Calling a pl/sql function from oracle forms

    I have written a pl/sql function in a package.
    package name- sup
    function name - func
    I have written a when-button-pressed trigger .from here I want to call this function.
    How can I do that?
    Please help..

    Thanks a lot..
    User may select 20-30 check boxes for respective name & id...then at the end , user will hit OK...from here when-button-click will call a procedure....that will update/insert/delete a table data.The procedure I have written is:-
    DECLARE
    N_CNT Number(1);
    D_SYSDATE Constant date :=sysdate;
    Begin
    select count(1)
    into N_CNT
    from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    if ((N_CNT = 0) and (:LANDLISTE.state = 'A')) then
    insert into dbtable
    LAND_ID,
    STATE,
    suppl_prof_id,
    suppl_id,
    OPERATOER_ID,
    SIDST_OPD_DATO,
    SIDST_OPD_INIT
    values
    :BLK1.LAND_ID,
    'Y',
    :BLK1.suppl_prof_id,
    :BLK1.suppl_id,
    :BLK1.Operatoer_id,
    D_SYSDATE,
    :BLK1.SIDST_OPD_INIT
    elseif
    ((N_CNT>0 )and (:LANDLISTE.state = 'A')) then
    update dbtable L
    set L.SIDST_OPD_DATO = D_SYSDATE,
    L.SIDST_OPD_INIT = :BLK1.SIDST_OPD_INIT
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    elseif ((N_CNT>0 ) and (:LANDLISTE.state = 'D')) then
    delete from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    end if;
    end;
    Will it be able to load multiple data(20-30 at a time) to the table?
    Should I write anything to commit the data in the table?
    I am very new to oracle forms...please help..

  • CALLING a STORED SQL FUNCTION from  Java 1.1.8

    I am trying to execute a stored function in JAVA 1.1.8, from an Oracle
    8i Database. My stored function is simple, it converts an Input Number to an output TIME string. I am unsure how to code the call from Java. Are SQL STORED PROCEDURES treated the same as SQL STORED FUNCTIONS? Do you use the CallableProcdure class or something else?
    Thanks for your input.

    yep - same way. Except no return value.

  • Calling a PL/SQL function returning Netsed Table Rows

    Hi,
    I am trying to call a Function which returns Nested Table rows (as Out Parameter) in Java .
    When I am trying to use
    pstmt.registerOutParameter(3, OracleTypes.OTHER);
    to capture the Out parameter in Java code , I get the follwoing error :
    java.sql.SQLException: Invalid column type
    I have even tried using OracleTypes.JAVA_OBJECT ,but I get the same error.
    If I use OracleTypes.JAVA_STRUCT I get
    java.sql.SQLException: Parameter Type Conflict: sqlType=2008
    error.
    Please help .
    Am I doing the right thing ?
    Thanks in advance.
    Ninad

    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/jdbc20/jdbc20.html

  • Calling pl/sql function in controller

    HI all
    i have a problem in calling a pl/sql function in a controller..
    the question is can we call a pl/sql function in a controller if so
    will the code below works???
    String invoice_id=getInvoiceId().toString();
    Number Invoice_amount=getAmount();
    DBTransaction txn = getDBTransaction();
    String Filesql="BEGIN SELECT sum(AMOUNT_REMAINING) into :1 FROM ap_payment_schedules_all where invoice_id=:2;END;";
    OracleCallableStatement Filecs=(OracleCallableStatement)txn.createCallableStatement(Filesql,1);
    String AmountRemaining = "";
    try{
    Filecs.registerOutParameter(1, OracleTypes.VARCHAR, 0, 100);
    Filecs.setString(2,invoice_id);
    Filecs.execute();
    AmountRemaining=Filecs.getString(1);
    Filecs.close();
    catch(SQLException sqle){
    try { Filecs.close(); } catch (Exception e) {;}
    throw OAException.wrapperException(sqle);
    when i write the above code in a controller ..it is saying getDBTransaction not defined....
    can u help me out in this...

    String RuleName=pageContext.getParameter("CashRule");
    String OrgId=pageContext.getParameter("OrgId");
    String TransType=pageContext.getParameter("TransactionType");
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OADBTransaction txn = am.getOADBTransaction();
    String Filesql="BEGIN select cle_f246_return_anal_mod_pkg.ret_anal_module(:2,:3,:4) into :1 from dual;END;";
    OracleCallableStatement Filecs=(OracleCallableStatement)txn.createCallableStatement(Filesql,1);
    String AnalyticalModule = "";
    try{
    Filecs.registerOutParameter(1, OracleTypes.VARCHAR, 0, 100);
    Filecs.setString(2,TransType);
    Filecs.setString(3,RuleName);
    Filecs.setString(4,OrgId);
    Filecs.execute();
    AnalyticalModule=Filecs.getString(1);
    Filecs.close();
    catch(SQLException sqle){
    try { Filecs.close(); } catch (Exception e) {;}
    throw OAException.wrapperException(sqle);
    this is the code i wrote in controller processformRequest...all the parameters are showiing correct values...but i am getting following error at Filecs.close();
    org_id is of type Number but i am passing that as a string as setString accepts only strings...will that cause ne problem???
    the error is:
    oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-01722: invalid number ORA-06512: at line 1 at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896) at oracle.apps.cle.f246.webui.CashReportDetailsCO.processFormRequest(CashReportDetailsCO.java:88) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:813) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1178) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1025) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:991) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:846) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1025) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:991) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:846) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2840) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1834) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420) at OA.jspService(_OA.java:75) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) ## Detail 0 ## java.sql.SQLException: ORA-01722: invalid number ORA-06512: at line 1 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215) at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:967) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3327) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3433) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394) at oracle.apps.cle.f246.webui.CashReportDetailsCO.processFormRequest(CashReportDetailsCO.java:82) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:813) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1178) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1025) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:991) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:846) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1025) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:991) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:846) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2840) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1834) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420) at OA.jspService(_OA.java:75) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) java.sql.SQLException: ORA-01722: invalid number ORA-06512: at line 1 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215) at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:967) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3327) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3433) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394) at oracle.apps.cle.f246.webui.CashReportDetailsCO.processFormRequest(CashReportDetailsCO.java:82) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:813) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1178) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1025) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:991) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:846) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1025) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:991) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:846) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2840) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1834) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420) at OA.jspService(_OA.java:75) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)

  • Calling PL/SQL Functions And Open Oracle Reports From ADF Application

    Hi all,
    My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application.
    Thank You..
    Jack.N

    Hi Jack.N,
    calling PL/SQL Functions -----> http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
    Open Oracle Reports ---------> http://radio-weblogs.com/0137094/2008/06/15.html
    You will find The Integration between ADF and other systems in ---> http://wiki.oracle.com/page/ADF+Integration
    Sameh Nassar

Maybe you are looking for

  • To create a table as given below

    havent got the answer clearly. i need to enter in the date format as 'dd-mm-yyyy'. while creating table itself we need to give in this format only. as create table t1 ename varchar(20), address varchar(20), hire_date date, salary number(5), dob (we e

  • How to view members of Dynamic Distribution Group via Outlook client?

    Hello, Is it possible to view the members of a DDG via the outlook cliënt (exchange 2010 SP1 + Outlook 2010)? For a normal Distribution Group I can see who are the members by viewing it's properties but not for a Dynamic Distribution Group.... Thnx R

  • Another cannot find symbol error (DiveLog)

    Hi I am fairly new to java and I decided to try the tutorial DiveLog. I followed the instructions, however when I try to compile it, not with the DOS command, I keep getting an error stating that, Cannot find symbol class ..... The errors keep recurr

  • Query Report for manual Reconciliation

    Hi Experts I want to take print layout for manual reconciliation or can any provide me with a query .It will be very much useful for me system path: modules - >Banking---- Bank Statements & External Reconciliations --->Manual Reconciliation here I gi

  • Have Yahoo Mail Plus  Help

    Logging in to mail server "plus.pop.mail.yahoo.com" failed. This server may require an additional fee for Yahoo! POP access. For more information, visit Yahoo! Mail Plus. If you continue, you might not be able to receive messages.