Home » SQL & PL/SQL » SQL & PL/SQL » PACKAGE:-PARAMETER PROBLEM
PACKAGE:-PARAMETER PROBLEM [message #210754] Fri, 22 December 2006 03:48 Go to next message
CHAISH
Messages: 12
Registered: December 2006
Junior Member
hi i have created the package it gets compiled successfully!when trying to access MANAGE_STUDENT.STUDENT1(1001) I get following error plz help

SQL> EXEC MANAGE_STUDENT.STUDENT1(1001);
BEGIN MANAGE_STUDENT.STUDENT1(1001); END;

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


package is::


CREATE OR REPLACE PACKAGE MANAGE_STUDENT AS
TYPE S IS VARRAY(20) OF STUDENT.STUDID%TYPE;
STUD S :=S();
PROCEDURE STUDENT1(CID IN CID IN COURSE.COURSEID%TYPE, STUD OUT S);
PROCEDURE DISP_STUDENT(STUD IN S);
END MANAGE_STUDENT;

CREATE OR REPLACE PACKAGE BODY MANAGE_STUDENT
AS
PROCEDURE STUDENT1 (CID IN COURSE.COURSEID%TYPE, STUD OUT S)
IS
BEGIN
SELECT STUDENT.STUDID BULK COLLECT INTO STUD
from student,course,registration
where student.studid=registration.studid
and course.courseid=registration.courseid
and course.courseid = cid;
END STUDENT1;
PROCEDURE DISP_STUDENT(STUD IN S)
IS
BEGIN
FOR I IN 1..STUD.LAST
LOOP
DBMS_OUTPUT.PUT_LINE(STUD(I));
END LOOP;
END DISP_STUDENT;
END MANAGE_STUDENT;
Re: PACKAGE:-PARAMETER PROBLEM [message #210757 is a reply to message #210754] Fri, 22 December 2006 03:52 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Your procedure had 2 parameters - 1 in and 1 out.
You are only specifying the In parameter when you call it.
Re: PACKAGE:-PARAMETER PROBLEM [message #210758 is a reply to message #210757] Fri, 22 December 2006 03:55 Go to previous message
CHAISH
Messages: 12
Registered: December 2006
Junior Member
what value u give to the out parameter.plz help.
Previous Topic: Configure Oracle using the tns.ora file
Next Topic: How to view List of Files under a Directory path
Goto Forum:
  


Current Time: Thu Dec 08 16:31:02 CST 2016

Total time taken to generate the page: 0.07426 seconds