Could not fill dataset from Oracle cursor stored procedure!

avt2k7

New member
Joined
Dec 21, 2011
Messages
4
Programming Experience
3-5
Hello all,

I got an error when fill the dataset from Oracle stored procedure using ref cursor:

ORA-06550:line 1, column 7
PLS-00306:wrong number of types of arguments in call to 'SP_TEST'
ORA-06550:line 1, column 7:
PL/SQL:Statement ignored

Here are my store procedure and window code behind as following:
===================================================================

CREATE OR REPLACE PROCEDURE TESTDEV.SP_TEST
(P_YEAR IN VARCHAR2,
P_SEMESTER IN VARCHAR2,
P_DROPOUT IN VARCHAR2,
RS OUT SYS_REFCURSOR)
IS
P_RET_STATUS VARCHAR2(5);

BEGIN
OPEN RS FOR
SELECT NAME, SCHOOL, CLASS, YEAR, SEMESTER, DROPOUT_YN, COMMENT
FROM SCHOOL_INSPECTION
WHERE YEAR = P_YEAR AND SEMESTER = P_SEMESTER AND DROPOUT_YN = P_DROPOUT;

P_RET_STATUS:=SQLCODE;

END SP_TEST;
/

To my dataSet, it has only one SchoolDataTable with columns as NAME, SCHOOL, CLASS, YEAR, SEMESTER, DROPOUT_YN, COMMENT

Anything wrong with my stored procedure using sys_refcursor or my VB.NET codes? Thanks in advance for any inputs that solve my issues.
 
Last edited:
I found the solution why I displayed the error because I misspell the parameter name when calling from stored procedure. Nothing wrong with SP. Thanks.
 
Back
Top