Error running a procedure in Python: (wrong number or types of arguments)

I am getting the following error when trying o execute a stored procedure in python.
cx_Oracle.DatabaseError: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'LOAD_FILE1'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
When executed from the SQL Plus or sql developer the same procedure runs without any issue. The following is the code of the called procedure:
create or replace
PROCEDURE load_file1 (
P_FILE_NAME in varchar2)* IS
src_file BFILE;
dst_file BLOB;
lgh_file BINARY_INTEGER;
BEGIN
src_file := bfilename('inbox_scnr_dir', P_FILE_NAME);
-- insert a NULL record to lock
the above procedure updates creates and updates a record in the table.
I am calling the above procedure as follows in my python code , see the curs.callproc("load_file1",osfile)
for filename in files:
osfile = doc_number(filename)
curs.callproc("load_file1",osfile)+
db.commit()
As you can see I am giving only one argument and the type is string as well, it passes the filename like 'abx.txt' to the procedure. So I am not wrong there.
Am I calling it in a wrong way or the cx_Oracle have some limitation about procedure callings.
Can the gurus on the forum help me please. Just need a direction to resolve this , if you can guide me.
Thanks
Edited by: user10903866 on Feb 28, 2013 5:54 AM
Edited by: user10903866 on Feb 28, 2013 6:45 AM

CREATE OR REPLACE
PACKAGE TESTER AS
TYPE t_ref_cur IS REF CURSOR;
PROCEDURE getRS (p_recordset OUT t_ref_cur);
END;
CREATE OR REPLACE
PACKAGE BODY TESTER AS
PROCEDURE getRS (p_recordset OUT t_ref_cur) AS
BEGIN
OPEN p_recordset FOR
SELECT
name,
value
FROM
Parameters;
END;
END;For this type of procedure call, you should first have the ref cursor declaration like below
declare
cur tester.t_ref_cur;
begin
tester.getRS (cur);
for i in cur
loop
dbms_output.put_line(i.name);
end loop;
close cur;
end;Using sys_refcursor also, your handling will be same as shown above......sys_refcursor and normal weak ref cursor only make difference if it is stand alone procedure

Similar Messages

  • Getting issue while running the SP - wrong number or types of arguments in

    CREATE OR REPLACE PROCEDURE TestSPForOracle
    (cv_1 IN OUT SYS_REFCURSOR)
    AS
    BEGIN
    DELETE FROM tt_abc;
    INSERT INTO tt_abc (SELECT * FROM tblPrdCatMstr_TT);
         OPEN cv_1 FOR
    SELECT * FROM tt_abc;
    END;
    above mentioned sp code compile with warning, and when I try to run this SP getting below error -
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TESTSPFORORACLE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Here I already created a temp table using below code -
    CREATE GLOBAL TEMPORARY TABLE tt_abc
    AS (
    SELECT *
    FROM tblPrdCatMstr_TT
    Any suggesstions?
    Edited by: 835891 on Feb 11, 2011 3:20 AM

    In that case we need to write all SPs again in the oracle mannerOf course, otherwise why do the migration.
    In my opinion, it's an utter waste of time and money migrating to Oracle if you're not going to accomodate the fundamental differences between different vendors and also play to their relative strengths.
    You can get what you've done to work.
    The issue is how you're calling it probably - you've not answered that question above.
    But it's crazy not to migrate away from temp table usage. It really is.
    Just do a search on the forum:
    http://forums.oracle.com/forums/search.jspa?threadID=&q=sql+server+temp+table&objID=f75&dateRange=lastyear&userID=&numResults=15&rankBy=10001

  • Error : PLS-00306: wrong number or types of arguments

    Hi,
    I have created a function :
    create or replace procedure Test11 AS
    x Test.Emp_No%Type;
    Begin
    select emp_no into x from Test where name = 'Sud';
    x := x + 1;
    update Test set emp_no = x where emp_no < 100;
    commit;
    end Test11;
    This has compiled successfully in PL/SQL Developer. Now, I have created an executable of this procedure in Front end - 11i. And then I have created a Program of this executable. Then I have added this program to a request group.
    Now that I am running this request and I getting this error in the log :
    ORACLE error 6550 in FDPSTP
    Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST11'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    .

    Hi,
    Your procedure is a little confusing. By the way, this procedure has no parameters and I supose that maybe you are calling it with some parameter. Could you check this please?
    Tip: post your code inside tags (start and end tag are the same) to proper formatting :)
    Regards,
    Edited by: Walter Fernández on Dec 3, 2008 10:53 AM - Adding tip...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • PLSQL Concurrent error: wrong number or types of arguments in call

    Hi there,
    I've defined a PLSQL Concurrent with 2 parameters:
    10) DELIVERABLE_ID using valueset 10/Number (A 10 digit positive number field with no validation)
    20) STATUS using valueset 10 Characters (10 Characters free text with no validation)
    My request run into error, with parameter values DELIVERABLE_ID = 105367,STATUS=New
    Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'EBOARD_WF_START'
    ORA-06550: line 1, column 7:
    But I ran the the same PLSQL from toad
    ADB_PA_BC_WF.EBOARD_WF_START (105367,'New');
    I dont have any error, it completed successfully.
    Any clue what gone wrong?

    You need to define package / procedure with RETCODE and ERRBUF arguments to call as concurrent program.
    procedure my_cp
    ( errbuf out varchar2,
    retcode out varchar2,
    p_arg1 in varchar2,
    p_arg2 in varchar2
    Regards,
    Gareth

  • Wrong number or types of arguments in call to procedure name

    assuming i have this pl/sql code:
    CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE tab_array IS TABLE OF VARCHAR2(300);
    PROCEDURE my_procedure(in_values IN tab_array);
    END MyPackage;
    CREATE OR REPLACE PACKAGE BODY MyPackage AS
    PROCEDURE my_procedure(in_values IN tab_array) IS
    BEGIN
    DBMS_OUTPUT.PUTLINE('This is only a test');
    END my_procedure;
    END MyPackage;
    when i tried typing this on SQL*Plus
    execute mypackage.my_procedure('value1, value2, value3');
    it gives an error like:
    PLS-00306: wrong number or types of arguments in call to 'MY_PROCEDURE'
    PL/SQL: Statement ignored
    Is my parameters incorrect? What should the parameter be? Please give me a sample code.
    Thanks.

    Hi,
    1. typing error: there should be an underline.
    i.e. DBMS_OUTPUT.PUT_LINE('This is only a test');
    2. Since the tab_array type is user defined (although
    it is VARCHAR2), When the package is called, it cannot
    recognize what you pass in even if you declare it in
    the calling block.
    You should create it as global type, then this type
    can be visible to all other PL/SQL, stored procedure &
    stored package. you can type the following in the SQL/PLUS:
    SQL> CREATE TYPE tab_array AS TABLE OF VARCHAR2(300);
    2 /
    3. Remove the declaration line for the tab_array in the package
    and package body. If you declare it locally in the package,
    it will override the global one and cannot be recognized again.
    So just remove it. it should be compiled and run.
    Hope you succeed.
    Thanks.

  • Error 306, wrong number or types of argument in call to ADD_OBJECT_ARG

    Hello all,
    I am trying to install Webutil to Forms 9i, but when compiling the webutil.pll, I am getting the compilation error 306, wrong number or types of argument in call to ADD_OBJECT_ARG(args, a0, 'java/lang/Object').
    The problems are in the body of Package Jave_System when some methods of JNI are called.
    What is JNI and how i can fix this problem?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Instructor:
    The procedure most likely requires an argument when executed.
    To specify the argument in forms, you need to go to BLOCK property QUERY DATA SOURCE ARGUMENTS and if performing DML...use INSERT PROCEDURE ARGUMENTS, UPDATE PROCEDURE ARGUMENTS, and DELETE PROCEDURE ARGUMENTS.
    Hope this helps.<HR></BLOCKQUOTE>
    thanks, I will check it out !
    null

  • Form Builder. Error 306 wrong number or types of arguments in call to populate_table

    Hi ! I'm trying to build a simple form based on a procedure.
    the error that i get:
    error 306 - wrong number or types of arguments in call to populate_table
    When I use the Data block
    wizard, I specify the procedure with a ref cursor argument. the procedure code:
    open ind_prof for select i.nome, i.idade, p.nome
    from individuo i, individuo_profissao ip, profissao p
    where i.cod_individuo=ip.cod_individuo
    and ip.cod_profissao=p.cod_profissao;
    The error that i get 'points' to this procedure. I checked the cursor type, the record
    type and everything seems ok.
    I'm using a ref cursor to query.
    I have the same proble either using a procedure or a function.
    There is another method to load the data into the block. That procedure is called
    automatically and it has a table of the same record type as the ref cursor as an
    argument. What code should I write on it ?
    what should I write in both of them ?
    Thanks !

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Instructor:
    The procedure most likely requires an argument when executed.
    To specify the argument in forms, you need to go to BLOCK property QUERY DATA SOURCE ARGUMENTS and if performing DML...use INSERT PROCEDURE ARGUMENTS, UPDATE PROCEDURE ARGUMENTS, and DELETE PROCEDURE ARGUMENTS.
    Hope this helps.<HR></BLOCKQUOTE>
    thanks, I will check it out !
    null

  • Error PLS-00306: wrong number or types of arguments in call to

    I am getting the following Error when calling stored Procedure, I have tried with Last Parameter PRESULT and WITHOUT IT, it fails in both the instance.
    =======================================================================
    "System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'UPDATECOTRACKING'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    =======================================================================
    signature of Stored Procedure is as follow
    (pmaster_key IN sca_costtrackinglog.master_key%type,
         pdoc_master_key IN sca_costtrackinglog.master_key%type,     
    pfrenumber IN sca_costtrackinglog.fre_number%type,     
    pnotice1 IN sca_costtrackinglog.notice1%type,
    pnotice2 IN sca_costtrackinglog.notice2%type,
    padditreceived IN sca_costtrackinglog.additreceived%type,
    pfreanticipate IN sca_costtrackinglog.freanticipate%type,
    pdateofnot IN sca_costtrackinglog.dateofnot%type,
    pdateofmeeting IN sca_costtrackinglog.dateofmeeting%type,
    psenttocontractor IN sca_costtrackinglog.senttocontractor%type,
    pcouforexecution IN sca_costtrackinglog.couforexecution%type,
    pcomments IN sca_costtrackinglog.comments%type,
    pcreateby IN sca_costtrackinglog.createby%type,
    peditby IN sca_costtrackinglog.editby%type,
         presult OUT number) is
    This is the Trace of Parameters from actual Call, that fails with above error.
    Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(26), Value = 000328JYA30008HSWBCK01NYC
    Parameter Name : pdoc_master_key(Input),Type(AnsiString) Size(26), Value = 310657KLF30025HSWBCK01NYC
    Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(12), Value = 00015
    Parameter Name : PNOTICE1(Input),Type(DateTime) Size(1), Value = 3/25/2010
    Parameter Name : PNOTICE2(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(1), Value =
    Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(1), Value =
    Parameter Name : pcouforexecution(Input),Type(DateTime) Size(1), Value =
    Parameter Name : pcomments(Input),Type(AnsiString) Size(250), Value =
    Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
    Parameter Name : PEDITBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Below is the trace from Data.OracleClient.OracleCommandBuilder.DeriveParameters(Cmd)
    Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PDOC_MASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PNOTICE1(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PNOTICE2(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PCOUFOREXECUTION(Input),Type(DateTime) Size(0), Value =
    Parameter Name : PCOMMENTS(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PEDITBY(Input),Type(AnsiString) Size(2000), Value =
    Parameter Name : PRESULT(Output),Type(VarNumeric) Size(0), Value =
    ******************************************************************************************************************

    In the Oracle database, the body of the package FWA_PRI API, the procedure ValidatePri declares P_PriREc as being :
    PAYMENT_REQUEST_IMPORT%ROWTYPE
    As you can see above, the DoPri Procedure expects a type p_PriRec as its second argument.
    Therefore in my procedure I do the following:
    create or replace procedure spMatchPayment is
    BEGIN
    DECLARE
           CURSOR StageCurs IS SELECT * FROM PAYMENT_REQUEST_IMPORT;
                  p_payment_req_import PAYMENT_REQUEST_IMPORT%ROWTYPE;
                  BEGIN
                       OPEN StageCurs();
                            LOOP
                                FETCH StageCurs INTO P_payment_req_import;
                                EXIT WHEN StageCurs%NOTFOUND;
                                fwa_pri.DoPri(NULL, fwa_pri.DoPri('M',P_PriRec => p_payment_req_import);                           
                             END LOOP;
                        CLOSE StageCurs;
                   END;
    end spMatchPayment;
    Now, when I am trying to compile I am getting the Compilation errors for PROCEDURE IMPACT.SPMATCHPAYMENT
    Error: PLS-00306: wrong number or types of arguments in call to 'DOPRI'
    Line: 16
    Text: fwa_pri.DoPri(NULL,P_PriRec => p_payment_req_import);
    I don't see what's wrong on my code......HELP!!

  • PLS-00306 wrong number or types of arguments in call to 'procedure'

    now i am using oracle10g xe , i get the following error
    create or replace procedure proc_name(slno_in in number,
    name_out out varchar2,fee_out out number)
    is
    v_name student.name%type;
    v_fee student.fee%type;
    begin
    select name,fee into v_name,v_fee from
    student where slno=slno_in;
    name_out := v_name;
    fee_out := v_fee;
    end proc_ref;
    Procedure created.
    SQL> exec proc_name(1);
    BEGIN proc_ref(1); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PROC_REF'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    please help me

    You have a procedure with three arguments
    >
    create or replace procedure proc_name(slno_in in number,
    name_out out varchar2,fee_out out number)You then call it by providing one argument
    >
    SQL> exec proc_name(1);
    BEGIN proc_ref(1); END;
    You get an error saying wrong number of arguments.
    PLS-00306: wrong number or types of arguments in call to 'PROC_REF'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    I don't see how it can be any clearer, call the procedure with three arguments.
    var string varchar2(100)
    var num number
    exec proc_ref(1, :string, :num)

  • Error: wrong number or types of arguments

    Getting the following error:-
    wrong number or types of arguments in call to 'XMLTYPE'
    with the following insert statement:-
    INSERT INTO com_xml(name,content)
    VALUES (V_FILENAME,XMLType(bfilename('EMAIL_ATTACH', 'JobInstructions.xml')));
    Any ideas for a fix folks?

    hi guys
    managed a work around with utl_file
    DECLARE
    V_FILENAME VARCHAR2(20):= 'JobInstructions.xml';
    V_PATH     VARCHAR2(100):= '/oracle/attachments';
    +V_XML      CLOB;                 --HOLDS THE CONTENTS OF THE XML FILE TO BE INSERTED IN TO THE DATABASE+
    +VNEWLINE   VARCHAR2(200):= '';   --HOLDS THE LINE TO INSERTED IN TO V_xml+
    +VSFILE     utl_file.file_type;   --HOLDS THE FILE+
    BEGIN
    VSFile := utl_file.fopen(V_PATH, V_FILENAME,'r');
    IF utl_file.is_open(VSFILE) THEN
    LOOP
    BEGIN
    utl_file.get_line(VSFILE, vNewLine);
    IF vNewLine IS NULL THEN
    EXIT;
    ELSE
    V_XML := V_XML||vNewLine;
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    END LOOP;
    END IF;
    --insert the file into com_xml+
    --INSERT THE FILE CONTENTS+
    INSERT INTO COM_XML(name,content)
    VALUES ('STEW',XMLType(V_XML));
    end;

  • PLS-00306: wrong number or types of arguments in call to . Error Help

    I have create a algorithm which The member function at the end, returns xc and yc.
    ERROR at line 9:
    ORA-06550: line 9, column 63:
    PLS-00306: wrong number or types of arguments in call to 'o'
    ORA-06550: line 9, column 2:
    PL/SQL: Statement ignored

    Guess your function has: RETURN NUMBER
    If so, the statement RETURN 'True' will give you exactly that error.
    Also:
    Return xc;
    Return yc;
    does not work as intended. The function will end by returning xc. (If it ever makes it that far)

  • Issue with proc-ora-06550 wrong number or types of arguments in call to

    Hi....
    When i am running the flollwing procedure as
    SQL> exec Prc_WA_Default_Currt_flag(15445);
    the following error is thrown.......could someone help me and please let me know how this can be corrected.
    BEGIN Prc_WA_Default_Currt_flag(15445); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to
    'PRC_WA_DEFAULT_CURRT_FLAG'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ***proc code****
    CREATE OR REPLACE procedure Prc_WA_Default_Currt_flag(Instance_Id_Upd_in in number,dummy1 out number) as
    Instance_Id_Upd1 number;
    dummy2 number;
    cursor c1 is select rwid from wa_temp_default;
    begin
    Instance_Id_Upd1:=Instance_Id_Upd_in;
    for i in c1 loop
    update default_event_log set current_flag=null,Instance_id_upd=Instance_Id_Upd1
    where rowid =i.rwid and load_date<(select currLoadtime from wa_batch where
    jobname='Default_event_log') and current_flag='Y';
    end loop;
    commit;
    for i in c1 loop
    update default_event_log set current_flag='Y'
    where load_date>=(select currLoadtime from wa_batch where
    jobname='Default_event_log') and rowid=i.rwid;
    end loop;
    commit;
    select to_number(Instance_Id_Upd1) into dummy1 from dual;
    end;
    /

    Hi,
    Since it contains an out parameter it has to run this way
    declare
    dummy_out number;
    begin
    prc_wa_default_currt_flag(15445,dummy_out);
    end;Regards
    Anurag

  • PLS-00306: wrong number or types of arguments in call in a for loop

    Dear all
    I recently put up another post about the same error message but as the message now relates to another part of my programme and, in my mind at least, a different conceptual idea, I thought I should start a new top. If that is not right thing to have done then please let me know. I am working in 10.2.
    I am trying to pass through multiple variables. When I run the code at the end of this question I get an error message:
    PLS-00306: wrong number or types of arguments in call to 'CUR_MAP_LIST'This relates to the line:
    FOR var_map_list IN cur_map_list (par_map_list (n))I think the reason the error message comes up is because par_map_list is a associate array / PL/SQL table and cur_map_list is based on %rowtype. Although I could be wrong. However I am not sure what I should be doing so that I don't get such an error message.
    I was reading through page 623 on Web Development 9i (by Brown; pub. McGrew-Hill) and pages 357-358 of Oracle Web Application Programming for PL/SQL Developers (by Boardman, Caffrey, Morse, Rosenzweig; pub. Prentice Hall), in order to try and write my code. As well as Oracle's Application Developer’s Guide - Fundamentals (Release 2), page 11-6. In particular the Web Development book uses the following:
    create or replace procedure query_department
    (in_dept_no owa_util.ident_arr)
    is
    cursor dept_cursor (nbt_dept_no emp.deptno%TYPE) is
    select empno, ename, mgr, sal, comm
    from scott.emp
    where deptno = nbt_dept_no;
    begin
      for x in 1 .. in_dept_no.count loop
        for dept_rec in dept_cursor(in_dept_no (x)) loop
        end loop;
      end loop;
    end;In that example the cursor selects empno, ename, mgr, sal and comm from emp. So if it is doing that the cursor must be of a VARCHAR2 and NUMBER data type. What I don't understand is the for dept_rec in part. For a start I am not sure where dept_rec comes from? If it is a NUMBER data type, how can the in_dept_no, which is a owa_util.ident_arr associate array / PL/SQL data type work with it. Unfortunately because the example is incomplete and doesn't include procedures relating to the in variables, I am unable to run it and try and learn from what it is doing, so that I can try and relate the concept to my own work.
    My programme is as follows. There may be other errors in the code not relating to this error. If so I hope to find these and resolve them once I understand what I should be doing here:
    --Global variables--
    gvar_mapviewer_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/mapviewer/omserver';
    gvar_proc_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/www/geg50160';
    gvar_xml_request VARCHAR2(100) :='?xml_request=<?xml version="1.0" standalone="yes"?>';
    --Main calling programming--
    PROCEDURE MAPS AS
    empty owa_util.ident_arr;
    var_xml_theme VARCHAR2(32767);
    BEGIN
    PROCMAPLIST (empty, var_xml_theme);
    END maps;
    --create checkboxes--
    PROCEDURE PROCCHECKLIST
    (par_check_list IN OUT owa_util.ident_arr,
      par_xml_theme OUT VARCHAR2
      AS
       CURSOR cur_map_list IS
        SELECT MT.map_title
               MI.map_id
               OMSN.map_sheet_number_id
               WRMF.web_raster_map_id
         FROM MAP_TITLE MT
              MAP_INFO MI
              MAP_SHEET_NUMBER OMSN,
              WEB_RASTER_MAP_FILE WRMF,
          WHERE MI.map_title_id = MT.map_title_id
          AND   MI.map_id = OMSN.map_id
          AND   WRMF.map_id = MI.map_id
          AND   WRMF.map_sheet_number_id = OMSN.map_sheet_number_id;
        var_map_list cur_map_list%ROWTYPE;
        var_xml_theme VARCHAR2(32767);
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.headClose;
    htp.bodyOpen;
    htp.print('<FORM METHOD = "post"
                     ACTION = "'||gvar_proc_host||'.mappackage.procdisplay">');
        htp.print('<FIELDSET>
                     <LEGEND> Select the maps you wish to display </LEGEND>');
      FOR n IN 1 .. par_map_list.COUNT
      LOOP
      FOR var_map_list IN cur_map_list (par_map_list (n))
      LOOP
    htp.print('       <UL>
                       <LI>
                        <LABEL FOR = "WRMF'||
                                      var_map_list.web_raster_map_id||'">
                         <INPUT type = "checkbox"
                                id = "WRMFB'||
                                      var_map_list.web_raster_map_id||'"
                                name = "WRMFB'||
                                        var_map_list.web_raster_map_id||'"
                                value = "'||var_map_list.web_raster_map_id||'"
                                />
                                 Map title: '|| var_map_list.map_title||'<BR>
                                 Sheet number: '||var_map_list.map_sheet_number||'');
                        htp.print('</LABEL>
                       </LI>
                      </UL>');
        END LOOP;
      END LOOP;
         htp.print('</FIELDSET>');
         htp.print('<p>
                     <INPUT TYPE = "submit"
                            NAME = "Display&nbspselected&nbspmaps"
                            VALUE = "Display selected maps" />
                      </FORM>');
    htp.bodyClose;
    END PROCCHECKLIST;Thank you for reading. Kind regards
    Tim

    Dear everyone
    I have now resolved the problems I was having with multiple values and checkboxes, thanks to comments in this thread, read large chucks of Oracle PL/SQL Programming by Steve Feuerstein and suddenly realising where I am going wrong in terms of thinking.
    For a start, I when I was dealing with the multiple values, I was trying to get PL/SQL to pass them out. Of course this is done by the action part of the input form. Although I have not done much web coding, I did know about this. However because I was so engrossed in trying to understand how multiple values work, I didn't relate the two ideas. I even mind mapping the problem and still didn't get it.
    I also did not think to change my the action from post command to get, so that I could see what was coming out. However that would not have made too much of a difference because the other problem I had was related to where sub programmes were declared. The function which received the values was privately declared, and not in the package spec. This meant the web browser could not find the function as that can only make use of the programmes declared publicly.
    Once I made these changes, as well as correcting other minor typing mistakes, the values passed through as expected. The only other mistake I made was to include the name option after the submit input type. In my case I did not need to submit the value of that button. The revised code is as follows. In this version I replaced the function with a procedure that simply prints the checkbox values to screen. I have also made the input form action get, instead of post, so that the values can be seen in the web browser address bar:
    create or replace
    PACKAGE MAPSITE AS
    PROCEDURE MAPS;
    PROCEDURE PROCCHECKLIST
    (par_check_list IN OUT OWA_UTIL.IDENT_ARR
    PROCEDURE PROCDISPLAY
    (maplist IN OUT OWA_UTIL.IDENT_ARR);
    END MAPSITE;
    create or replace
    PACKAGE BODY MAPSITE AS
    --Global variables--
    gvar_mapviewer_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/mapviewer/omserver';
    gvar_proc_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/www/geg50160';
    gvar_xml_request VARCHAR2(100) :='?xml_request=<?xml version="1.0" standalone="yes"?>';
    --Main calling programming--
    PROCEDURE MAPS AS
    empty owa_util.ident_arr;
    BEGIN
    PROCCHECKLIST (empty);
    END MAPS;
    --create checkboxes--
    PROCEDURE PROCCHECKLIST
    (par_check_list IN OUT owa_util.ident_arr
      AS
       CURSOR cur_map_list IS
        SELECT MT.map_title,
               MI.map_id,
               OMSN.map_sheet_number_id,
               WRMF.web_raster_map_id
         FROM MAP_TITLE MT,
              MAP_INFO MI,
              MAP_SHEET_NUMBER OMSN,
              WEB_RASTER_MAP_FILE WRMF
          WHERE MI.map_title_id = MT.map_title_id
          AND   MI.map_id = OMSN.map_id
          AND   WRMF.map_id = MI.map_id
          AND   WRMF.map_sheet_number_id = OMSN.map_sheet_number_id;
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.headClose;
    htp.bodyOpen;
    htp.print('<FORM METHOD = "post"
                     ACTION = "'||gvar_proc_host||'.mappackage.procdisplay">');
        htp.print('<FIELDSET>
                     <LEGEND> Select the maps you wish to display </LEGEND>');
      FOR var_map_list IN cur_map_list
      LOOP
    htp.print('       <UL>
                       <LI>
                        <LABEL FOR = "WRMF'||
                                      var_map_list.web_raster_map_id||'">
                         <INPUT type = "checkbox"
                                id = "WRMFB'||
                                      var_map_list.web_raster_map_id||'"
                                name = "maplist"
                                CHECKED = "' ||
                                           par_map_list ||'"
                                value = "'||var_map_list.web_raster_map_id||'"
                                />
                                 Map title: '|| var_map_list.map_title||'<BR>
                                 Sheet number: '||var_map_list.map_sheet_number||'');
                        htp.print('</LABEL>
                       </LI>
                      </UL>');
        END LOOP;
         htp.print('</FIELDSET>');
         htp.print('<p>
                     <INPUT TYPE = "submit"
                            VALUE = "Display selected maps" />
                      </FORM>');
    htp.bodyClose;
    END PROCCHECKLIST;
    ---PROCDISPLAY PROCEDURE---
    PROCEDURE PROCDISPLAY (maplist IN OUT owa_util.ident_arr)
    IS
    BEGIN
    FOR n IN 1..maplist.COUNT
    LOOP
      htp.print('Checkbox value i.e. var_map_list.web_raster_map_id is: ' ||maplist(n)||'
    <P>');
    END LOOP;
    END PROCDISPLAY;
    END MAPSITE;Kind regards
    Tim

  • Wrong number or types of arguments

    Rearly need your help.
    I got error from run a package.procedure.
    SQL> exec pac_info.get_node_info;
    BEGIN pac_info.get_node_info; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GET_NODE_INFO'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    which is column 7? If I run this procedure in SQL Developer, I got no error.
    ================================================
    Below is my source:
    PROCEDURE get_node_info(p_insert OUT NUMBER, pUpdate OUT NUMBER)
    AS
    l_node pac_nodes.node_name%TYPE;
    l_insert NUMBER := 0;
    l_update NUMBER := 0;
    l_status VARCHAR2(200);
    BEGIN
    pac_util.register('pac_info','get_node_info');
    FOR tmp in (SELECT tmp.node_name
    , tmp.node_type
    , tmp.domain
    , tmp.vendor
    , tmp.tcp_ip
    , tmp.fixed_ip
    , tmp.model
    , tmp.os
    , tmp.os_version
    , tmp.memory_mb
    , tmp.cpu_total
    , tmp.cpu_db_total
    , tmp.environment
    , tmp.country
    , tmp.internet_exposed
    , tmp.database_server
    , tmp.dedicated_db_server
    FROM tmp_node_list tmp
    LOOP
    l_status := 'Node :'||tmp.node_name;
    l_node := pac_info.format_host_name(tmp.node_name);
    IF node_in_pac(l_node)
    THEN
    -- node exists
    pac_util.log_debug('Update',l_status);
    UPDATE pac_nodes
    SET node_type = nvl(node_type,tmp.node_type)
    , domain = nvl(domain,tmp.domain)
    , vendor = nvl(vendor,tmp.vendor)
    , tcp_ip = nvl(tcp_ip,tmp.tcp_ip)
    , fixed_ip = nvl(fixed_ip,tmp.fixed_ip)
    , model = nvl(model,tmp.model)
    , os = nvl(os,tmp.os)
    , os_version = nvl(os_version,tmp.os_version)
    , memory_mb = nvl(memory_mb,tmp.memory_mb)
    , cpu_total = nvl(cpu_total,tmp.cpu_total)
    , cpu_db_total = nvl(cpu_db_total,tmp.cpu_db_total)
    , environment = nvl(environment,tmp.environment)
    , country = nvl(country,tmp.country)
    , internet_exposed = nvl(internet_exposed,tmp.internet_exposed)
    , database_server = nvl(database_server,tmp.database_server)
    , dedicated_db_server = nvl(dedicated_db_server,tmp.dedicated_db_server)
    , update_user = 'pac_USER'
    WHERE node_name = l_node;
    l_update := l_update + 1;
    ELSE
    pac_util.log_debug('Insert',l_status);
    INSERT INTO pac_nodes
    ( id
    , node_name
    , node_type
    , domain
    , vendor
    , tcp_ip
    , fixed_ip
    , model
    , os
    , os_version
    , memory_mb
    , cpu_total
    , cpu_db_total
    , environment
    , country
    , internet_exposed
    , database_server
    , dedicated_db_server
    VALUES
    ( pac_create_id
    , l_node
    , tmp.node_type
    , tmp.domain
    , tmp.vendor
    , tmp.tcp_ip
    , tmp.fixed_ip
    , tmp.model
    , tmp.os
    , tmp.os_version
    , tmp.memory_mb
    , tmp.cpu_total
    , tmp.cpu_db_total
    , tmp.environment
    , tmp.country
    , tmp.internet_exposed
    , tmp.database_server
    , tmp.dedicated_db_server);
    l_insert := l_insert + 1;
    END IF;
    END LOOP;
    COMMIT;
    pac_util.log_info('Nodes Inserted:'||l_insert);
    pac_util.log_info('Nodes Updated :'||l_update);
    pac_util.unregister;
    p_insert := l_insert;
    pUpdate:=l_update;
    EXCEPTION
    WHEN OTHERS THEN
    pac_util.log_error(SQLERRM);
    RAISE_APPLICATION_ERROR(-20001,l_status||' '||SQLERRM);
    END ;
    ====================================================

    Hi,
    user318649 wrote:
    Rearly need your help.
    I got error from run a package.procedure.
    SQL> exec pac_info.get_node_info;
    BEGIN pac_info.get_node_info; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GET_NODE_INFO'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredPLS-00306 is one of those errors that actually means what it says.
    pac_info.get_node info is defined as taking 2 arguments, but you're trying to call it with 0 arguments. That's the wrong number.
    which is column 7? It's the column containing 'p' of pac_info; that's where the part causing the error begins.
    If I run this procedure in SQL Developer, I got no error. Show exactly what you do to run it in SQL Developer.
    Compare that to what you posted above.
    ================================================
    Below is my source:
    PROCEDURE get_node_info(p_insert OUT NUMBER, pUpdate OUT NUMBER)
    AS ...You can call it from SQL*lus like this:
    DECLARE
        my_p_insert     NUMBER;
        my_pupdate      NUMBER;
    BEGIN
        pac_info.get_node_info (my_p_insert, my_pupdate);
    END;
    /

  • Strange PLS-00306: wrong number or types of arguments

    We have the code in production and in the test. the dbs, the servers are setup the same. And the codes on two are the same (verified).
    Now all a sudden the code on production failing sine yesterday afternoon:
    BEGIN REQUEST_API.DBSS_process_FUDS; END;
    ERROR at line 1:
    ORA-06550: line 1, column 93:
    PLS-00306: wrong number or types of arguments in call to 'PROCESS_FUDS'
    ORA-06550: line 1, column 93:
    PL/SQL: Statement ignored
    ORA-06512: at "SYS.DBMS_JOB", line 82
    ORA-06512: at "SYS.DBMS_JOB", line 140
    ORA-06512: at "ER.REQUEST_API", line 1190
    ORA-06512: at line 1
    Just with the test's , it still runs OK.
    Any idea? how can we look?
    Thanks a lot!

    BluShadow wrote:
    Check the call to PROCESS_FUDS and check the definition of PROCESS_FUDS and see what's different.
    It could be that something has been relying on implicit datatype conversions i.e. strings to dates and someone has entered some data that doesn't comply with the implicit conversion (i.e. you database stores dates as strings and allows people to enter cr@p data).It is 11.2.0.3
    PROCESS_FUDS is the job and defined the same on the two db.
    I did spool the code of ER.REQUEST_API from dba_source for the two dbs and dff them. Found no different.
    In the same sqlplus client on the remote server:
    on the test db:
    me@cpt1> exec ER.REQUEST_API.DBSS_process_FUDS
    PL/SQL procedure successfully completed.
    on the prod db:
    me@cpp1> exec ER.REQUEST_API.DBSS_process_FUDS
    BEGIN REQUEST_API.DBSS_process_FUDS; END;
    ERROR at line 1:
    ORA-06550: line 1, column 93:
    PLS-00306: wrong number or types of arguments in call to 'PROCESS_FUDS'
    ORA-06550: line 1, column 93:
    PL/SQL: Statement ignored
    ORA-06512: at "SYS.DBMS_JOB", line 82
    ORA-06512: at "SYS.DBMS_JOB", line 140
    ORA-06512: at "ER.REQUEST_API", line 1190
    ORA-06512: at line 1

Maybe you are looking for