Menu

wrong number or types of arguments

Developers
2006-06-14
2013-04-25
  • PrettyHandling

    PrettyHandling - 2006-06-14

    Hi guys,

      My oracle procedure is like below:

    CREATE OR REPLACE PROCEDURE mytest1 (t1 IN VARCHAR)
    IS

    BEGIN

          INSERT INTO hyperion.test1 (name)
               VALUES (t1);
      

    END mytest1;
    .
    =======================================

    and my sqlunit test is like below:

        <test name="Execute test1 store procedure" failure-message="Failed to Execute test1 store procedure">
              <call>
                <stmt>{call hyperion.mytest1}</stmt>
                <param id="1" type="VARCHAR" inout="in">hello bro</param>
              </call>
               
              <result id="r1" echo="true">

              </result>
        </test>

    =======================================

    when I run it the following error message i got:

      [sqlunit] <exception>
      [sqlunit] <code>6550</code>
      [sqlunit] <message>ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'MYTEST1' ORA-06550: line 1, column 7: PL/SQL: Statement ignored</message>
      [sqlunit] </exception>

    =====================

    the table test1 is just

    id (primary key NUMBER)
    name (VARCHAR2)

    please help, Thanks !

    regards,
    Mark

     
    • Sujit Pal

      Sujit Pal - 2006-06-14

      Hi Mark,

      This query should probably have been more appropriately directed at the user's forum, since this is a usage issue.

      I think you may have missed the question mark to set the parameter placeholder. So, this should work:

      <call>
      ...<stmt>{call hyperion.mytest1(?)}</stmt>
      ...
      </call>

      instead of:
      <call>
      ...<stmt>{call hyperion.mytest1}</stmt>
      ...
      </call>

      -sujit

       
    • PrettyHandling

      PrettyHandling - 2006-06-15

      Hi Sujit ,

         Thanks a lot for your advice. It's my stupid mistake !

      Mark

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.