Calling a Database Procedure from an Oracle Form

Hi,
I have a question we will be calling the procedure from an Oracle form and through that can we pass like 1000 input values to this procedure and we need to return certain values back to the Oracle Form also. Here the proceduere take two or more parameters. Please advice.
To receive the input values we have the input parameter of the procedure as type object, so that we can receive multiple parameter values.
Thanks and Regards
Srinivas

user2626293 wrote:
Hi Francois,
Thanks for your response, please suggest me as to how we can acheive passing of parameters which can hold multiple values, while making a call to the database procedure from the Oracle Form
Hi Srinivas,
Here is an example of procedure...
CREATE OR REPLACE PROCEDURE P_GET_SAL (P_EMPID NUMBER, P_SAL OUT NUMBER)
IS
BEGIN
     SELECT SALARY
     INTO P_SAL
     FROM EMPLOYEE
     WHERE EMPLOYEE_ID=P_EMPID;
END;
SQL> VAR G_SAL NUMBER;
SQL> EXEC P_GET_SAL(100,:G_SAL);
PL/SQL procedure successfully completed.
SQL> PRINT G_SAL;
G_SAL
      2300Hope this helps
Hamid
If someone's response is helpful or correct, please mark it accordingly.*

Similar Messages

  • How to call a COM object from an Oracle Form?

    Hi All,
    Pls advice. How to call a COM object from an Oracle Form?
    Thanks.

    try asking the "Form" forum

  • Error while calling standard OAF page from custom Oracle Form

    Hi,
    I am calling standard OAF page from custom oracle form using the following code.
    FND_FUNCTION.EXECUTE(FUNCTION_NAME=>'FUN_TRX_ENTRY_OUT_VIEW_BATCH',
    OPEN_FLAG =>'Y',
    SESSION_FLAG =>'N' ,
    OTHER_PARAMS =>'&ViewBatchID = "' || NAME_IN('FUN_AGIS_LINE_D.BATCH_ID') ||
                        '&CallingFunction = "' || 'MANEXPINQ' ||'"');
    But I am getting this error.
    oracle.apps.fnd.framework.OAException: This request was not processed as the request URL %2FOA_HTML%2FOA.jsp%3Fpage%3D%2Foracle%2Fapps%2Ffun%2Ftransaction%2Fentry%2Fwebui%2FViewOutBatchPG%26OAPB%3DFUN_PRODUCT_BRAND%26OAHP%3DFUN_SSWA_MENU%26OASF%3DFUN_TRX_ENTRY_OUT_SEARCH%26_ti%3D1217029204%26language_code%3DUS%26%26ViewBatchID%20%3D%20%22203148%26CallingFunction%20%3D%20%22MANEXPINQ%22%26CallFromForm%3D%27Y%27%26oas%3DqZqg3tmdEdUNyw_HtskVow.. contained potentially illegal or un-encoded characters. Please try again by submitting a valid URL or contact your systems administrator for assistance.
    Please let me know any thing I missed out here.
    Any suggestion will highly appreciated.
    Thanks & Regards,
    Sunita

    I am using FND_FUNCTION.EXECUTE to call a OAF page from PLSQL in R12. I am getting following error"Error(9,23): PLS-00302: component 'EXECUTE' must be declared"

  • Can u call a BIP Report from within Oracle Forms?

    Hi,
    We want to use BIP as a reports solution for a Forms 10g Application. Currently we use oracle Reports. I would be very grateful if anybody can show us how to do the following as I could not find it in any documentation. Of course, I get the feeling that these cannot be done, but I want to double-check.
    (1.) How to call a BIP report with a input parameters from within an Oracle 10g Menu? i.e. when the user clicks on the menu item, BIP should be started and it should run the report within the BIP.
    -- So we also need a way to pass parameters to the BIP
    -- Also BIP has a different username/password also
    Is this possible or NOT POSSIBLE( i.e. U have to ask the user to login to BIP and then run the report)?
    Thanks & Regards,
    CS

    Hi,
    Have a look in this document to get an idea how to do:
    http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
    Regards
    Rainer

  • How do I call a SAP RFC from an Oracle Form using webutils CLIENT_OLE2?

    Hi guys,
    Your help on this problem would be greatly appreciated.
    We have an older forms 6i application which we are currently updating to 10g (which is a pain itself... but that's a different story.) which currently uses unssupported c++ routines to connect to the SAP system, we want to do away with this c++.
    What I have so far is the following test code:
    PROCEDURE cmd_summary
    IS
    o_sap_log client_ole2.obj_type;
    o_sap_conn client_ole2.obj_type;
    o_sap_rfcc client_ole2.obj_type;
    -- o_sap_rfcx client_ole2.obj_type;
    -- o_sap_rfc client_ole2.obj_type;
    v_args ole2.list_type;
    v_logon BOOLEAN := FALSE;
    BEGIN
    :block3.txt_result := 'TEST Started!';
    --create logon control object
    o_sap_log := client_ole2.create_obj ('SAP.logoncontrol.1');
    --create the function object
    o_sap_rfcc := client_ole2.create_obj ('SAP.Functions');
    --create a new connection object
    o_sap_conn := client_ole2.invoke_obj (o_sap_log, 'NewConnection');
    --set the connection properties
    client_ole2.set_property (o_sap_conn, 'System', caps$get_sys_param ('SAP_DST'));
    client_ole2.set_property (o_sap_conn, 'MessageServer', caps$get_sys_param ('SAP_HST'));
    client_ole2.set_property (o_sap_conn, 'GroupName', 'DEVELOP');
    client_ole2.set_property (o_sap_conn, 'client', caps$get_sys_param ('SAP_CLT'));
    client_ole2.set_property (o_sap_conn, 'SystemNumber', caps$get_sys_param ('SAP_SYN'));
    client_ole2.set_property (o_sap_conn, 'User', caps$get_sys_param ('SAP_USR'));
    client_ole2.set_property (o_sap_conn, 'Password', caps$get_sys_param ('SAP_PWD'));
    client_ole2.set_property (o_sap_conn, 'language', caps$get_sys_param ('SAP_LNG'));
    --set up the logon arguements
    v_args := client_ole2.create_arglist;
    client_ole2.add_arg (v_args, 1);
    client_ole2.add_arg (v_args, TRUE);
    --run the logon function
    v_logon := client_ole2.get_bool_property (o_sap_conn, 'logon', v_args);
    client_ole2.destroy_arglist (v_args);
    IF v_logon
    THEN
    :block3.txt_result := :block3.txt_result || CHR (10) || 'LOGON Worked!!';
    ELSE
    :block3.txt_result := :block3.txt_result || CHR (10) || 'LOGON Failed!!';
    END IF;
    :block3.txt_result := :block3.txt_result || CHR (10) || 'TEST Ended!';
    EXCEPTION
    WHEN OTHERS
    THEN
    :block3.txt_result := :block3.txt_result || CHR (10) || SQLERRM (SQLCODE);
    END cmd_summary;
    NOTE: the get_sys_param functionis returning text from a table.
    This seems to work okay, the logon command returning a TRUE. All good so far.
    However, when I try to then use this connection for anything then I stumble and fall!
    I've seen an example in VB where the SAP RFC object is "assigned" the connection object by simply stating:
    Set oSAPrfc.Connection = oSAPconn
    Where oSAPconn is setup in a similar way to my o_Sap_conn in the above example.
    I have tried using the CLIENT_OLE2.SET_PROPERTY procedures but I don't think that's quite right.
    I've tried using invoke, to try and "run" the method like:
    v_args := CLIENT_OLE2.CREATE_ARGLIST;
    client_ole2.add_arg_obj(v_args,o_sap_conn);
    client_ole2.invoke(o_sap_rfcc,'Connection',v_args);
    client_ole2.destroy_arglist(v_args);
    but it fails.
    I have also tried using the actual Connection function directly:
    SAP_ISAPFUNCTIONS.connection(o_sap_rfcc, o_sap_conn);
    But that just causes the Forms Server to crash... :?
    Has anyone connected to SAP via Forms? I noticed one post on this forum which an example of some code using a SAPBAPI control but not WEBUTIL (Which I think I'd need to use because we are running 10g)
    As a side note we are also looking into SAP Adapter as a possible "other" route but this too is getting very complicated... And I can't see a way of connecting a form to the Adpater anyway :(
    Any advice would be very much appreciated.

    Can anyone help?
    Mike

  • A Query regarding calling a DB procedure from a Crystal report

    Hi,
    Please tell me how can we call a database procedure from a crystal report  (crystal report XI)?
    I tried by selecting the procedure as a data source for the report; but its giving me an error "Invalid Argument Provided".
    The procedure contains a single Update table statement. Could anyone please help me to resolve this problem as early as possible ?
    Thanks & Regards,
    Priyashree Katkar.

    Duplicate of
    Crystal reports with a DB procedure
    Closing and locking this thread
    Ludek

  • Procedure runs in SQL Plus, but not when called from my Oracle Form

    Hi. I have this code to send an email alert as the user updates a record on my base table from my Oracle Form. I use dbms_scheduler so that it's submitted as a background job and so the email processing does not delay my Oracle Form from saving quickly. If I submit this code in SQL Plus it executes and I receive the email as expected.
    begin
    dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationConflict_Notify (62547, ''01-SEP-11'', ''02-SEP-11''); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;However if I submit this code from a Post-Update trigger in my form the code runs without error, but my email is never received (the same parameter values would be passed to this trigger):
    begin
    -- Submit the email notification in the background so as to not slow down the screen while saving.   
    dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationConflict_Notify (:dropper_vacations.dropper_id, :dropper_vacations.begin_dt, :dropper_vacations.end_dt); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;     Any ideas why this might be happening?

    Wow, so I changed the two procedures so that I'm only passing in one number parameter and one char parameter...
    CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
    CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) ISIf I execute it like this it works and I get the email:
    TTMS.job_vacationconflict_notify(62547, 99999);or like this it works and I get the email:
    TTMS.job_vacationconflict_notify(62547, '99999');But if I execute it like this (I get no errors) the email is not sent:
    TTMS.job_vacationconflict_notify(62547, 'ababa');So this problem really has nothing to do with date formats. It seems to have to do with whether parameter two has characters in it!!! What the heck.
    Any ideas on this?
    Here is the procedure I'm calling:
    CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
    begin
      dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationemailurl_new ('||p_dropper_id||','||p_other||'); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;
    /And the above procedure is calling this procedure which should be sending the email alert:
    CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) IS
          myguid varchar2(15):=null;
          pcm_contact varchar2(3):=null;
          guid_contact varchar2(15):=null;
          conflict_cnt number(8):=0;
          -- Various declarations
          PSENDER VARCHAR2(200);            --  From
          PRECIPIENT VARCHAR2(200);         --  To
          P_CC_RECIPIENT VARCHAR2(200);     --  CC
          P_BCC_RECIPIENT VARCHAR2(200);    --  BCC
          PSUBJECT VARCHAR2(200);           --  Subject
          PMESSAGE VARCHAR2(6000);          --  Message Body
          PPARAMETER NUMBER;                --  Parameter Value
          guid_valid varchar2(15);          --  Used to grab the validation value of
          -- Grab name details of e-mail targets
          cursor targets is
          select guid, initcap(first_name) first_name, initcap(first_name)||' '||initcap(last_name) fullname
          from pwc_employee
          where upper(guid) = upper(guid_contact);
    BEGIN
            select count(*)
            into conflict_cnt
            from dropper_bundle_assign
            where
                dropper_sched = in_dropper_id and
                trunc(sched) <> '31-DEC-29' AND        
                trunc(sched) between '01-SEP-11' and '02-SEP-11' and
                trunc(sched) > trunc(sysdate);
            select distinct pcm
            into pcm_contact
            from dropper_bundle_assign
            where
                  dropper_sched = in_dropper_id and
                  trunc(sched) <> '31-DEC-29' AND        
                  trunc(sched) between '01-SEP-11' and '02-SEP-11' and
                  trunc(sched) > trunc(sysdate);
            select guid
            into guid_contact
            from pwc_employee
            where initials = pcm_contact;
        -- Ensure required parameters have been passed
        if guid_contact is not null
           and in_dropper_id is not null then
               Begin
                    select guid
                    into guid_valid
                    from pwc_employee
                    where upper(guid) = upper(guid_contact);
               Exception
                    when no_data_found then
                    raise_application_error(-20000,'Invalid Recipient.  Please check the employee table.  Please try again.');
               End;
               -- In the event there are multiple targets then we will loop thru and send individual emails
               for thisone in targets loop
                    PSENDER := lower(user)||'@us.ibm.com';
                    PRECIPIENT := lower(thisone.guid)||'@us.ibm.com';
                    P_CC_RECIPIENT := lower(thisone.guid)||'@us.ibm.com';
                    P_BCC_RECIPIENT := 'ssbuechl'||'@us.ibm.com';
                    PPARAMETER := TO_NUMBER(lower(in_dropper_id));
                    PSUBJECT := 'TEST: Dropper Vacation '||in_other||' Conflict Notification for dropper '||in_dropper_id||' - Action Required';
                    PMESSAGE := thisone.first_name||'-<br><br>There is an induction conflict due to a new or updated dropper vacation.<br><br>Click here to the dropper''s vacation conflicts: <u><a href="http://9.35.32.205:7777/forms/frmservlet?config=TTMSMENU&form=dropper_vacations&otherparams=p_dropper='||PPARAMETER||'">Dropper Id: '||PPARAMETER||'</a></u> (note: use your Oracle credentials when prompted for log-on information).<br><br>Thanks.';
                    SEND_MAIL ( PSENDER, PRECIPIENT, P_CC_RECIPIENT, P_BCC_RECIPIENT, PSUBJECT, PMESSAGE );  -- Procedure to physically send the e-mail notification
               end loop;
        else
              raise_application_error(-20001,'Recipient and Parameter Value are required. Please try again.');
        end if;
    exception
        when no_data_found then
             raise_application_error(-20002,'Note: Email will not be sent because no PCM was identified as the manager or the PCM does not have a record in the Employee table.  See ITS for assistance.');
         when too_many_rows then
             raise_application_error(-20003,'Note: Email will not be sent because multiple PCMs manage this dropper. Please notify each PCM manually.');
    END dropperVacationEmailURL_new;
    /Edited by: sharpe on Aug 17, 2011 4:38 PM
    Edited by: sharpe on Aug 17, 2011 5:03 PM

  • Calling PLSQL Stored Procedure From HTML Form Submit Button

    Hi there,
    I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
    HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
    HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
    HTP.PRINT('</form></div>');Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work.
    Lets call them class_number, term, conf These three variables will be passed and the data will be deleted and the person will see a confirmation screen once the delete query has been executed.
    So ideally I would want: ZWGKERCF.P_confdelete(class_number, term, conf) and then the stored procedure would handle the rest!
    Seems pretty simple but I am not sure how to make this happen... My thoughts were:
    Pass the data to this html form (the three fields I need) in hidden variables. Then somehow pass these using POST method to the procedure and read using GET?
    Can someone clarify what the best way to do this is? I have a feeling its something small I am missing - but I would really like some expert insight :-)
    Thanks so much in advance!
    - Jeff

    795018 wrote:
    I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
    HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
    HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
    HTP.PRINT('</form></div>');Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work. The browser generates a POST or a GET for that form action, that includes all the fields defined in that form. Let's say you define HTML text input fields name and surname for the form. The URL generated for that form's submission will be:
    http://../ZWGKERCF.P_confdelete?name=value1&surname=value2The browser therefore submits the values of the form as part of the URL.
    The web server receives this. It sees that the base URL (aka location) is serviced by Oracle's mod_plsql. It passes the URL to this module. This module builds a PL/SQL block and makes the call to Oracle. If we ignore the additional calls it makes (setting up an OWA environment for that Oracle session), this is how the call to Oracle basically looks like:
    begin
      ZWGKERCF.P_confdelete( name=> :value1, surname =>  :value2 );
    end;Thus the PL/SQL web enabled procedure gets all the input fields from the HTML form, via its parameter signature. As you can define parameter values with defaults, you can support variable parameter calls. For example, let's say our procedure also have a birthDate parameter that is default null. The above call will still work (from a HTML form that does not have a date field). And so will the following URL and call that includes a birth date:
    URL:
    http://../ZWGKERCF.P_confdelete?name=value1&surname=value2&birthdate=2000/01/01
    PL/SQL call:
    begin
      ZWGKERCF.P_confdelete( name=> :value1, surname =>  :value2, birthdate => :value3 );
    end;There is also another call method you can use - the flexible 2 parameter interface. In this case the PL/SQL procedure name in the URL is suffixed with an exclamation mark. This instructs the mod_plsql module to put all input field names it received from the web browser into a string array. And put all the values for those fields in another string array. Then it calls your procedure with these arrays as input.
    Your procedure therefore has a fixed parameter signature. Two parameters only. Both are string arrays.
    The advantage of this method is that your procedure can dynamically deal with the web browser's input - any number of fields. The procedure's signature no longer needs to match the HTML form's signature.
    You can also defined RESTful mod_plsql calls to PL/SQL. In which case the call format from the web browser looks different and is handled differently by mod_plsql.
    All this (and more) is detailed in the Oracle manuals dealing with mod_plsql - have a search via http://tahiti.oracle.com (Oracle Documentation Portal) for the relevant manuals for the Oracle version you are using.
    Alternatively, simply download and install Oracle Apex (Application Express). This is a web development and run-time framework and do all the complexities for you - including web state management, optimistic locking, security and so on.

  • ORA-06553: PLS-908 when calling 10g remote procedure from 11g database

    Hi,
    I have 2 instances: 11g (11.1.0.7) and 10g (10.2.0.4). When I try to call 10g (remote) procedure from 11g database, there is errors:
    ORA-04052: error occurred when looking up remote object CUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK
    ORA-06541: PL/SQL: compilation error - compilation aborted
    ORA-06553: PLS-908: The stored format ofCUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK is not supported...
    But, if I call the same procedure from another 10g instance, it's OK.
    How can I fix the problem?
    Thx,
    qtpham

    As you can see ,it seems like the workaround that was mentioned there is currently the only way to remove this ORA.
    Workaround: Remove the function call(s) from the called subroutine's
                package's spec.

  • Call an html help (*.chm) from an oracle form

    we used to call a help file (oracle_dba_help.hlp) from an oracle form by using the following code .
    Declare
    Htype PLS_INTEGER;
    Begin
    Htype := WIN_API.HELP_CONTEXT;
    WIN_API_SHELL.WINHELP('C:\oracle_dba_help.hlp','11',Htype);
    End;
    but when we used the html help(oracle_dba_help.chm) instead of help compiler(oracle_dba_help.hlp) it didn't accept
    please give us a way to call html help from a form.

    eeddings wrote:
    Thanks for the idea, but I can't switch the project to WebHelp.  This .chm project consists of a master project with 18 slave projects and a slew of remote jumps.  I'd have to recreate all of the remote jumps if I switch to WebHelp.
    Hopefully Adobe can fix this issue.
    Well, first off, even though it would be WebHelp, it would be inside a CHM container. So for all intents and purposes it would be a CHM file. But having said that, I'm not sure there is a way to merge these hybrid types of CHM files.
    If your statement about Adobe fixing the issue is meaning that they can either remove the Print icon from the CHM Viewer, I wouldn't hold my breath because as I said, that's in Microsoft's lap and they haven't updated the CHM viewer in a long while. Doubtful they ever will.
    The only hope would then be for Adobe to update the code used for the Mini TOC. The only way that will happen is if enough folks submit this as a bug via the following link:
    http://www.adobe.com/go/wish
    Until that would happen, your likely best bet is to simply avoid using the Mini-TOC feature or just insert a warning that if the topic is printed, it will cause issues. Or, you could use bookmarks and links to establish your own verision of a "Mini-TOC"
    Cheers... Rick

  • Calling a stored procedure from within a ViewObject

    Is it possible to make stored procedure call from within a BC4J ViewObject? Basically something like this:
    select * from table(f1(3)); where f1 is a table function. Using Oracle's pipelined table functions?
    If not, is it possible to call a stored procedure from Java and have the returned results be put back into a BC4J RowSet.
    In addition, is there a way to create a JDBC Resultset from a BC4J RowSet?
    We need to be able to dynamically create our SQL statements (the entire SQL, not just the where clause) but are required to have these sql statements generated/executed from within a pl/sql stored procedure in the database.

    Is it possible to make stored procedure call from within a BC4J ViewObject? Basically something like this:
    select * from table(f1(3)); where f1 is a table function. Using Oracle's pipelined table functions?
    Yes. Using our expert-mode query feature this is possible.
    is it possible to call a stored procedure from Java and have the returned results be put back into a BC4J RowSet.
    Yes. See this article about basing a view object on a REF CURSOR:
    http://radio.weblogs.com/0118231/2003/03/03.html
    In addition, is there a way to create a JDBC Resultset from a BC4J RowSet?
    No. Not directly. What's the business requirement here so I can understand better?
    We need to be able to dynamically create our SQL statements (the entire SQL, not just the where clause) but are required to have these sql statements generated/executed from within a pl/sql stored procedure in the database.
    REF CURSOR would work fine, or if it's just the statement that needs to be generated dynamically, you could fetch the text of the SQL statement from the stored procedure, then use createViewObjectFromQueryStmt(). Although this has runtime overhead involved with describing the query.
    The REF CURSOR based approach is probably best for this.

  • Calling a stored procedure from a url

    I am needing to call a stored procedure from a url string (or
    anchor) understand that from training to be as follows:
    http://host:port/pls/dad/package.procedure?query_string
    With that in mind, I am getting an error as follows:
    Not Found
    The requested URL /pls/portal30/at_hrfm.checkshow.showcheck was
    not found on this server.
    Here is a sample of my url
    http://servername:port/pls/portal30/at_hrfm.checkshow.showcheck
    I can see servername:port/pls/portal30, it is just the
    procedure I am having a problem with.
    Here is a sample of my source code that is created under the
    at_hrfm schema (I also tried under portal30 schema).
    package body checkshow as
    procedure showcheck as
    begin
    htp.htmlOpen;
    htp.headOpen;
    htp.title('My Check');
    htp.comment ('This should be your Check');
    htp.bodyOpen;
    htp.header (1,'Check');
    htp.print ('checkdate');
    htp.bodyClose;
    htp.headClose;
    htp.htmlClose;
    end;
    end;

    I think I figured this out. I don't think the grant to ANONYMOUS is going to work with production XE and the online documentation is in need of an update. It appears that production XE has been locked down and you will need to specify the name of each stored procedure you wish to allow to be executed by adding it to the WWV_FLOW_EPG_INCLUDE_MOD_LOCAL function. This is spelled out in more technical detail here: http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/adm_wrkspc.htm#BEJCGJFJ
    Another alternative that would work involves creating a separate DAD. Using the DAD approach with my schema made all of my stored procedures callable from a web browser, so I rejected this approach. To make this usable (secure) I would have needed to create and maintain a separate database user for the DAD and then only granted it execute for the stored procedures I wanted to be callable from a URL.
    Finally I read about using an on-demand procedure and having it invoke the desired stored procedure. While I didn't try this out, it sounds like another good approach because it maintains session security. If it can be used to return an image I do not know.
    - Jim

  • Calling packaged stored procedure from Java

    Hi All,
    I'm trying to call a stored procedure from Java but I'm having
    problems with registrating the output parameter. I'm getting
    the error: Conflicting parameters.: sqltype=2003
    This is the stored procedure which is located in a package in
    the Oracle database:
    package Pack_GetAgencyInformation as
    Type InfoType is record ( agen_code varchar(3), agen_designation
    varchar(30), agen_adresse varchar(60), agen_tel varchar(12) );
    function GetAgencyInformation( P_AGENCE VARCHAR )
    return Pack_GetAgencyInformation.InfoType
    end Pack_GetAgencyInformation;
    This is the Java source from where I'm calling the procedure:
    //DriverManager.registerDriver (new
    oracle.jdbc.driver.OracleDriver());
         Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@164.48.69.125:1521:ventes", "system", "*****
    // @machineName:port:SID,
    userid, password
    CallableStatement cs = conn.prepareCall("{ ? = call
    Pack_GetAgencyInformation.GetAgencyInformation( ? )}");
         try {
              cs.registerOutParameter( 1,
    oracle.jdbc.driver.OracleTypes.ARRAY);
         } catch (SQLException e) {
              e.printStackTrace();
         cs.setString(2, "001" );
         //ResultSet rset = cs.executeQuery();
    The stacktrace:
    java.sql.SQLException: Parametertypen conflicteren.:
    sqlType=2003
    at oracle.jdbc.dbaccess.DBError.throwSqlException
    (DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException
    (DBError.java:210)
    at
    oracle.jdbc.driver.OracleCallableStatement.registerOutParameter
    (OracleCallableStatement.java:220)
    at
    oracle.jdbc.driver.OracleCallableStatement.registerOutParameter
    (OracleCallableStatement.java:350)
    at dbAccess.main(dbAccess.java:25)
    I think it has to do with the type InfoType which is created in
    the Stored Procedure. I'm absolute no Oracle expert and I
    prefer not to make changes to the Oracle database. So any
    solution in Java is welcome!
    BR, H.Rietman

    I managed to get it to work only by changing the stored
    procedure. I have changed the return type record to a Ref
    Cursor type (had to change alot of code for this). It seams
    that Oracle JDBC drivers DON'T support the Record type as a
    return type.
    So the next question is: is it possible to typecast a record
    type to a ref cursor type in Oracle. In this way I can easily
    change the return type for the stored procedures.
    /Harald

  • Can we call a stored procedure from a Trigger

    Hello Everyone,
    I need some help in writing the triggers in Oracle 10g Database.
    Can we call a stored procedure from a trigger?

    Can we call a stored procedure from a trigger? Yes. Why did you think we couldn't?
    Cheers, APC

  • Calling a JSP Report From HTML parameter form

    Hi,
    I m trying to run a JSP Report from a HTML parameter Form. The JSP reports requires a parameter named userid in the URL with a valid value for database connection.
    eg. URL "http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_crdinf.jsp?userid=sysapps/system@trt1". We have created a variable on the server named "parmformjsp" with a value "sysapps/system@trt1". Now i use this variable in the URL as follows, eg. "http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_crdinf.jsp?parmformjsp".
    When i use this URL to call another JSP report from a JSP report it works fine, but the same does not work when calling a JSP report from a HTML form.
    the code for HTML parameter form calling a report is as follows,
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Parameter Form</title>
    </head>
    <body>
    <p>Parameter Form</p>
    <form name="form1" method="GET"
    action="http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_custrns.jsp?parmformjsp">
    <p>From Date<input type="text" name="p_fmdate" size="20"></p>
    <p>To Date<input type="text" name="p_todate" size="20"></p>
    <p> </p>
    <p><input type="submit" ><input type="reset" value="Reset" name="B2"></p>
    </form>
    <p> </p>
    </body>
    </html>
    If i create an input parameter named "userid" with a valid database connection value, remove the ?parmformjsp part from the action URL then it works fine. How can i call the JSP report using the parmformjsp variable name instead of using the "userid" clause in the URL.Can anyone suggest any workaround....
    Thanks & Best Regards,
    Unmesh

    do it like this...
    DECLARE
    pl_id ParamList := Get_Parameter_List('tmpdata');
    BEGIN
    IF NOT Id_Null(pl_id) THEN
      Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id, 'ROUTE_CARD_CONTROL', TEXT_PARAMETER, :ROUTE_CARD.ROUTE_CARD_CONTROL);
    Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
    Run_Product(REPORTS, 'D:\STL_FINAL\CHPREPORTS_FINAL\ROUTE_CARD.REP', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END; what exactly happens when you call the report. if its showing the blank page... may be you are not passing the right parameter name. cross-check that your parameter name in the report is 'ROUTE_CARD_CONTROL'.

Maybe you are looking for