Call procedure with named parameters

Call procedure with positional parameters works, but with named parameters gives an ORA-907.
This post seems similar: Re: Error with report - pkg and bind var
Run as a script:
set echo on
call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false);
call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS');
begin dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false); end;
gives:
set echo on
call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false)
Error starting at line 2 in command:
call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false)
Error report:
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:
call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS')
call dbms_stats.delete_table_stats succeeded.
begin dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false); end;
anonymous block completed
I like the idea of using call, because the procedure name appears in the feedback - useful in longer scripts.
I'm using SQL Developer Version 1.5.1 Build MAIN-5440
on Windows XP SP3
with database EE 10.2.0.3

CALL is a SQL command which executes a routine
(procedure/function)
http://download-uk.oracle.com/docs/cd/B19306_01/server
.102/b14200/statements_4008.htm
whereas EXECUTE is a SQL*Plus command which executes
a single PL/SQL statement
http://download-uk.oracle.com/docs/cd/B19306_01/server
.102/b14357/ch12022.htm#i2697931
Message was edited by:
Jens PetersenThank you very much, esp. for the links!

Similar Messages

  • Calling procedure with 2 parameters from a dynamic link

    I have just another question-
    I have a procedure testing_del_archive which is being called with 2 parameters...from a dynamic link in my SQL Query.
    The following is my code....
    SELECT re.report_exec_id, re.exec_userid,
    NVL(re.batch_exec_date, re.begin_date) report_date,
    re.rows_returned,
    re.status, re.error,
    f_file_url(re.filename) file_url,
    re.comments,
    ''Archive''archive
    FROM metadev.report_execution re, metadev.report r
    WHERE re.report_id = r.report_id
    AND r.spec_number = :v_spec
    AND re.status <> 'DELETED'
    AND re.exec_userid like (DECODE(:v_user_filter,'ALL','%',:v_user_filter))
    ORDER BY begin_date DESC
    The first parameter is the value in the execution id field and the second argument is hardcoded "Archived"...
    IT GIVES AN ERROR....
    Do you guys know where I am going wrong...

    You missed the ampersand symbol in between the parameters.
    This should be
    ''Archive''archive
    instead of
    ''Archive''archive

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

  • Calling stored procedure with output parameters in a different schema

    I have a simple stored procedure with two parameters:
    PROCEDURE Test1(
    pOutRecords OUT tCursorRef,
    pIdNumber IN NUMBER);
    where tCursorRef is REF CURSOR.
    (This procedure is part of a package with REF CURSOR declared in there)
    And I have two database schemas: AppOwner and AppUser.
    The above stored procedure is owned by AppOwner, but I have to execute this stored procedure from AppUser schema. I have created a private synonym and granted the neccessary privileges for AppUser schema to execute the package in the AppUser schema.
    When I ran the above procedure from VB using ADO and OraOLEDB.Oracle.1 driver, I got the following error when connecting to the AppUser schema:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    but when I was connecting to the AppOwner schema, everything is running correctly without errors.
    Also, when I switch to the microsoft MSDAORA.1 driver, I can execute the above procedure without any problems even when connecting to the AppUser schema.
    I got this error only when I am trying to execute a stored procedure with an output parameter. All other procedures with only input parameters have no problems at all.
    Do you know the reason for that? Thanks!

    If anyone has figured this one out let me know. I'm getting the same problem. Only in my case I've tried both the "OraOLEDB.Oracle" provider and the "MSDAORA" provider and I get an error either way. Also my procedure has 2 in parameters and 1 out parameter. At least now I know I'm not the only one with this issue. :)
    '*** the Oracle procedure ***
    Create sp_getconfiguration(mygroup in varchar2, myparameter in varchar2, myvalue out varchar2)
    AS
    rec_config tblconfiguration.configvalue%type;
    cursor cur_config is select configvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter;
    begin
    open cur_config;
    fetch cur_config into rec_config;
    close cur_config;
    myvalue := rec_config;
    end;
    '** the ado code ****
    dim dbconn as new adodb.connection
    dim oCmd as new adodb.connection
    dim ors as new adodb.recordset
    dbconn.provider = "MSDAORA" 'or dbconn.provider = "OraOLEDB.Oracle"
    dbconn.open "Data Source=dahdah;User ID=didi;Password=humdy;PLSQLRSet=1;"
    set ocmd.activeconnection = dbconn
    cmd.commandtext = "{call fogle.sp_getconfiguration(?,?)}"
    'i've also tried creating a public synonym called getconfiguration and just refering to procedure by that.
    ' "{call getconfiguration(?, ?)}"
    ' "{call getconfiguration(?,?, {resultset 1, myvalue})}"
    'and numerous numerous other combinations
    set oPrm = cmd.createparameter("MYGROUP", advarchar, adparaminput, 50, strGrouptoPassIn$)
    cmd.parameters.append oPrm
    set oPrm = cmd.createParameter("MYPARAMETER", advarchar, adParamInput, 50, strParameterToPassIn$)
    cmdParameters.append oPrm
    set rs = cmd.execute

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • OSB java call out with array parameters

    Hi all,
    I have a java call out with array parameters, follow the firm of java method:
    logBody2(String category, XmlObject headerXml, String[] level, XmlObject[] xml)
    The java call out have String[] and XmlObject[] arrays in intput, my question is how I can pass these arrays of values at java call out?
    Thk
    L.

    For array, comma-separated values should be passed. For e.g. -
    If input parameter is of type String[] then passed values should be comma-separated strings like - 'Anuj','Dwivedi'
    If input parameter is of type XmlObject[] then passed values should be comma-separated XmlObject like - <anuj/>,<dwivedi/>
    Regards,
    Anuj

  • Calling a stored procedure with default parameters

    Dear all,
    I am trying to call a stored procedure that has not all the parameters compulsory, and indeed, there are some I am not interested in. Therefore, I would like to call the stored procedure initializing only some of the parameters but if I miss some of them, I have an SQLException thrown. Is there any way to do that?
    Thanks
    Marie

    Hi
    One way to do it is ---
    By using Default Parameters you can miss few parameters while calling a procedure.
    =================================================================
    As the example below shows, you can initialize IN parameters to default values. That way, you can pass different numbers of actual parameters to a subprogram, accepting or overriding the default values as you please.
    Moreover, you can add new formal parameters without having to change every call to the subprogram.
    PROCEDURE create_dept (
    new_dname VARCHAR2 DEFAULT 'TEMP',
    new_loc VARCHAR2 DEFAULT 'TEMP') IS
    BEGIN
    INSERT INTO dept
    VALUES (deptno_seq.NEXTVAL, new_dname, new_loc);
    END;
    If an actual parameter is not passed, the default value of its corresponding formal parameter is used.
    Consider the following calls to create_dept:
    create_dept;
    create_dept('MARKETING');
    create_dept('MARKETING', 'NEW YORK');
    The first call passes no actual parameters, so both default values are used.
    The second call passes one actual parameter, so the default value for new_loc is used.
    The third call passes two actual parameters, so neither default value is used.
    Usually, you can use positional notation to override the default values of formal parameters.
    However, you cannot skip a formal parameter by leaving out its actual parameter.
    For example, the following call incorrectly associates the actual parameter 'NEW YORK' with the formal parameter new_dname:
    create_dept('NEW YORK'); -- incorrect
    You cannot solve the problem by leaving a placeholder for the actual parameter.
    For example, the following call is illegal:
    create_dept(, 'NEW YORK'); -- illegal
    In such cases, you must use named notation, as follows:
    create_dept(new_loc => 'NEW YORK');
    ===============================================================
    For more details refer URL http://technet.oracle.com/doc/server.804/a58236/07_subs.htm#3651
    Hope this helps
    Regards
    Ashwini

  • Executing procedures with OUT parameters using Named notation

    I have a procedure with two out parameters (p_errortext and p_returncode) and i want to execute this proc in SQL*plus using named notation(using association operator ' => '). For position based execution i usually declare variables to hold the OUT parameter's value. But how can i do this while executing using named notation (using => )
    begin
         packagename.generate_ref_record(p_userid  => 'THELMA',
                                      p_ref_code       => '9A',
                                      p_item_id    => '9990000011163',
                                      p_shipno     => '0PH',
                                      p_errortext  =>  ??
                                      p_returncode =>  ??);
    end;

    SQL>variable x varchar2(30);
    SQL>variable y varchar2(30);
    SQL>exec packagename.generate_ref_record(p_userid  => 'THELMA',     
                                          p_ref_code       => '9A',       
                                          p_item_id    => '9990000011163',     
                                          p_shipno     => '0PH',     
                                          p_errortext  =>  :x        
                                          p_returncode =>  :y);

  • PLS-00306 calling a procedure with default parameters

    Hi,
    I have the following procedure :
    PROCEDURE P_SUPPRESSION_ENRG (
    DIR in VARCHAR2,
    Tab_Diff_traitee in VARCHAR2,
    TabSup in VARCHAR2,
    ColCode in VARCHAR2,
    Code in VARCHAR2,
    Trig in VARCHAR2 default '',
    Etat in VARCHAR2 default '',
    TypMod in VARCHAR2 default '',
    IndRev in VARCHAR2 default '',
    Crd out NUMBER
    ) is
    END P_SUPPRESSION_ENRG;
    When I run this procedure without the parameters Trig,Etat,TypMod and IndRev, I receive the error PLS-00306 :
    INFOLIG.pck_diff.P_SUPPRESSION_ENRG(Directory,'DIFF_PYLONE_TYPE','DIFF_PYLONE_TYPE','DFP_PYL_CODE_PYLONE',rec.OIP_PYL_CODE_PYLONE,Icrd);
    PLS-00306
    wrong number or types of arguments in call to P_SUPPRESSION_ENRG.
    What have I to do to run this procedure without the parameters Trig,Etat,TypMod and IndRev ?
    Regards,
    Rachel

    hi, i think you are only passing 6 parameters when you called out the procedure p_supperion_enrg. your procedure requires a 10 parameters.
    if you do not want to include Trig,Etat,TypMod and IndRev you can simply put a null value.
      INFOLIG.pck_diff.P_SUPPRESSION_ENRG(Directory,
                                          'DIFF_PYLONE_TYPE',
                                          'DIFF_PYLONE_TYPE',
                                          'DFP_PYL_CODE_PYLONE',
                                          rec.OIP_PYL_CODE_PYLONE,
                                          Null,
                                          Null,
                                          Null,
                                          Null,
                                          Icrd); also you don't need to expplicitly defualt a parameter to null value. it is understood that parameters are initially default to null values.
      PROCEDURE P_SUPPRESSION_ENRG ( DIR              in VARCHAR2,
                                     Tab_Diff_traitee in VARCHAR2,
                                     TabSup           in VARCHAR2,
                                     ColCode          in VARCHAR2,
                                     Code             in VARCHAR2,
                                     Trig             in VARCHAR2,
                                     Etat             in VARCHAR2,
                                     TypMod           in VARCHAR2,
                                     IndRev           in VARCHAR2,
                                     Crd             out NUMBER ) IS
      END P_SUPPRESSION_ENRG;

  • Executing Procedure with default parameters !!

    hi want a small help ...
    I have a
    procedure p1(p1 in number default 2, p2 in number default 3)
    begin
    end;
    When the procedure will be called without passing parameters it will execute with default parameters.
    That time I want to dispay message saying
    " AS paramters are not passed, procedure is being executed with foll. default parameters:
    Param 1 = 2
    Param 2 = 3 "
    Now issue is how do I capture this condition that , the parameters are being passed and it is using default parameters ?
    Thanks

    The IF NOT NULL check for the parameters cannot be inside the same procedure becuase when you reach that statement, even though the parameter are not passed to this procedure, at that stage, the parameters will acquire the dfault values already assigned to them. So you never reach the else part of it.
    That;s why i said, use third parameter and assign the value to this third parameter from the calling environment.
    here is the short test case that might help you to understand better.
    SQL> create or replace procedure myproc
      2  (p1               number default 1
      3  ,p2               number default 2
      4  ,parameter_passed char default 'Y') is
      5  begin
      6    if parameter_passed = 'Y' then
      7      dbms_output.put_line('Input values are :'||p1||'='||p2);
      8    else
      9      dbms_output.put_line('Default values are :'||p1||'='||p2);
    10    end if;
    11  end;
    12  /
    Procedure created.
    SQL> PROMPT Test for Case one with input parameter values
    Test for Case one with input parameter values
    SQL>
    SQL> declare
      2   param1 number := 5;
      3   param2 number := 6;
      4  begin
      5   if param1 is not null and param2 is not null then
      6     myproc(param1,param2);
      7   else
      8     myproc(parameter_passed=>'N');
      9   end if;
    10  end;
    11  /
    Input values are :5=6                                                          
    PL/SQL procedure successfully completed.
    SQL>
    SQL> PROMPT Test for Case two with no parameter values
    Test for Case two with no parameter values
    SQL>
    SQL> declare
      2   param1 number := null;
      3   param2 number := null;
      4  begin
      5   if param1 is not null and param2 is not null then
      6     myproc(param1,param2);
      7   else
      8     myproc(parameter_passed=>'N');
      9   end if;
    10  end;
    11  /
    Default values are :1=2                                                        
    PL/SQL procedure successfully completed.
    SQL>

  • How to call procedure with Object types in java

    Hi,
    We have procedure declaration as follows
    ===============
    TYPE TEST_TYPE AS OBJECT (NAME VARCHAR2(10));
    TYPE TESTTYPE1 AS object (student1 TESTTYPE,student2 TESTTYPE,student3 TESTTYPE);
    TYPE rect AS OBJECT
    -- The type has 3 attributes.
    length NUMBER,
    width NUMBER,
    area NUMBER,
    -- Define a constructor that has only 2 parameters.
    CONSTRUCTOR FUNCTION rect(length NUMBER, width NUMBER)
    RETURN SELF AS RESULT
    PROCEDURE G(obj1 in TESTTYPE1,obj2 out rect) as
    n1 testtype;
    n2 testtype;
    n3 testtype;
    n4 testtype;
    begin
    obj2 := NEW rect(10,20,200);
    n1 := obj1.student1;
    n2 := obj1.student2;
    n3 := obj1.student3;
    obj2.length :=20;
    end;
    =====================================================
    I am not able to call the procedure in java code as I cannot figure out which out parameter type will it be registered using registeroutparameter. using cursor or struct type fails.
    please let me know how I can pass values from stored procedure with objects to java.

    I'm not sure what you're trying to accomplish with your procedure, but in general, this is an example of how you could use oracle.sql.STRUCT.
    First, prepare your java.sql.CallableStatement using java.sql.CallableStatement cStmt = java.sql.Connection.prepareCall({ call G(?, ?) });
    Note that you don't have to use the OracleCallableStatement. The java.sql.CallableStatement will work just fine.
    For the IN parameter, you need to create three TEST_TYPE objects. Then you need to create one TESTTYPE1 object.
    These will all be instances of oracle.sql.STRUCT.
    To create a oracle.sql.STRUCT object you need a descriptor and a set of attributes. For example, to create a TEST_TYPE object you would do the following
    1. StructDescriptor sd = StructDescriptor.createDescriptor("TEST_TYPE", java.sql.Connection).
    2. Add a VARCHAR2 attribute to an array of attributes (e.g. Object[] attributes = new Object[]{"Student Name"})
    3. oracle.sql.STRUCT struct = new oracle.sql.STRUCT(sd, java.sql.Connection, attributes)
    Then do something similar to create the TESTTYPE1 object, except that the attribute array will contain three instances of TEST_TYPE struct objects.
    To bind the IN parameter you need to use the java.sql.CallableStatement.setObject(1, <Instance of TESTTYPE1 object>).
    To register the OUT parameter, you need to call java.sql.CallableStatement.registerOutParameter(2, oracle.jdbc.OracleTypes.STRUCT, "RECT").
    Then, execute your procedure using cStmt.execute();
    Retrieve your OUT parameter using oracle.sql.STRUCT struct = (oracle.sql.STRUCT)cStmt.getObject(2).
    Once you've done that, to get the values of the attributes of all of your STRUCT objects, you need their descriptors and their metadata.

  • Call procedure with MS SQL from linked Oracle server

    I have a procedure on a remote server that I can call from SQL*PLUS
    set serveroutput on
    declare rez varchar2(99); msg varchar2(99); begin radar.test('AL25',rez,msg); dbms_output.put_line('Rez='||rez);
    dbms_output.put_line('Msg='||msg);
    end;
    it gives me the neccessary result.
    But I need to call the same procedure with MS SQL from a linked Oracle server, I'm trying to do it through openquery for a while, but no success yet.
    Can someone tell me what is the right syntax for that query in OPENQUERY?

    Have you tried configuring Oracle Heterogenous Services/ Transparent Gateway? This would let you link Oracle to SQL Server via a database link which should solve your problem.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • Select from function with named parameters doesn't work

    Hello,
    I'm trying to execute the next sql statement:
    SELECT mypack.getvalue(user_id => 231, status => 'closed') AS someAlias FROM DUAL;
    I'm getting the next Error:
    Error: ORA-00907: missing right parenthesis
    But the next works fine:
    SELECT mypack.getvalue(231,'closed') AS someAlias FROM DUAL;
    What I'm doing wrong?
    Is there a way to call a Function and return it's result as a single-row query?
    Thanks for any suggestions.

    Thanks for your answers.
    Just want to explain what I want to accomplish:
    I want to create PL/SQL statement which:
    1) Calls Function in named notation way;
    2) Returns a query which contains a single row - a Function result.
    I know in Transact-SQL I can accomplish this the next way:
    DECLARE @return_value INT
    EXEC[myproc]
    @id=2,
    @status='ok',
    @ret_param=@return_value OUTPUT
    SELECT @return_value AS my_return_value
    The last SELECT call returns a query with one row in it.
    How can I do the same in Oracle?
    Thanks a lot!

  • Problem calling Procedure with parameter from Dynamic Page

    I received an error saying the Page not found
    here's how to reproduce the error.
    1. Create procedure in portal30 schema.
    Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    2. Create Dynamic Page with following code
    <ORACLE>DECLARE
    v_total NUMBER;
    BEGIN
    ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<machine.domain:port#>/pls/portal30/PORTAL30.DYN_
    ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure');
    END;</ORACLE>
    3. I clicked on Customize Link and entered 2 numbers as values for v_one and v_two.
    4. Got "The page cannot be found" error in I.E. or "The requested URL /pls/portal30/PORTAL30.DYN_SAMPLE_ADD.show was not found on this server." on Netscape
    However when I subsitute "ADD_TWO_VALUES(:v_one,:v_two, v_total);" in the dynamic page for "ADD_TWO_VALUES(3,2, v_total);", it runs just fine.
    What's wrong here? Can I not use a parameter from a dynamic page and call a procedure with it? Help is needed urgently and will be greatly appreciated.
    -Ahsun

    Hi,
    I tried with your code with few changes ,please try with them.
    Create or Replace PROCEDURE <myschema>.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    I created the procedure in <mySchema> and granted that to <application_schema> and made some changes
    <ORACLE>
    DECLARE
    v_total NUMBER;
    BEGIN
    <procedure_schema>.ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<your_host>/pls/<portal_schema>/<application_schema>.DYN_FOR_OTN.SHOW_PARMS', 'Re-Execute Procedure');
    END;
    </ORACLE>
    Hope this helps.
    rahul

  • CallableStatement fails with named parameters

    A mystery. Very confusing. I have MSSQL. I use CallableStatement. When I set SP's paramters by index, e.g. setInt(1, 1), the call succeeds. However if I use named parameter approach, the call fails with exception "Error: [SQLException] Parameter '@pMyParam' not found in the parameter list.". The spelling appears correct -- compared letter by letter. Any ideas?

    You have a mistake or there is a bug in the driver.
    I would check to see if there is documentation for the driver you are using that has an example of doing what you are doing and see if you are doing it correctly according to that documentation. Then you'll have your answer.

Maybe you are looking for

  • Can you have more than one alert at a time show up on the lock screen?

    When i recieve a new message, this shows up as an alert on the lock screen when my phone is locked, as its supposed to. However, if a new alert comes through before i open the previous one, only the most recent one will appear on the lock screen. Is

  • Standby Database in 10g Standard One

    Hello Everyone, I need to do a standby database using Oracle Database 10g Standard One. Do you know how can I do it, step by step?? Thanks

  • How to retrive an Email ID from Microsoft Outlook in Java Programming ?

    Hi, Requirement : How would I get the Email lD from Outlook. I am developing an application where I receive a mail from it in that mail I have two Button One is "Approve" and other is "Reject". On each button I had written the separate code.Now I had

  • Garageband quit unexpectedly - Core audio driver loads

    The last time I used Garageband 2 I was at home connected to my DIGI002. This week I am on the other side of the country and I attempted to open Garageband 2 so that I could work on a recording. I received the message "The Application Garageband 2 qu

  • Reduction of records in WD view

    Hi, Question 1: I have a View that shows data like this: Cust.No          Valid From    Valid To P000333          30.11.09       10.12.09 do.                   11.12.09       21.12.09 do.                   22.12.09       27.02.10 do.