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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
Hi Sujit ,
Thanks a lot for your advice. It's my stupid mistake !
Mark