Home » SQL & PL/SQL » SQL & PL/SQL » Problem with stored procedures
Problem with stored procedures [message #263851] Fri, 31 August 2007 03:21 Go to next message
zama
Messages: 3
Registered: August 2007
Junior Member
Hi, guys I need help I created a stored procedure here it is:

[CREATE OR REPLACE PROCEDURE ADD_USER
(LStaffNo IN LECTURER.STAFFNO % TYPE,LUsername IN LECTURER.USERNAME %TYPE, LPassword IN LECTURER.PASSWORD % TYPE,LName IN LECTURER.NAME % TYPE, LSurname IN LECTURER.SURNAME % TYPE )
IS
BEGIN
INSERT INTO LECTURER VALUES(LStaffNo, LUsername, LPassword, LName, LSurname);
END ADD_USER;]

and it was successfully created. But when I execute it [EXEC ADD_USER]
it just give me this error:
[ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ADD_USER'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored]

I don't know what to do anymore because my whole application depends on this.

Re: Problem with stored procedures [message #263857 is a reply to message #263851] Fri, 31 August 2007 03:30 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Quote:
CREATE OR REPLACE PROCEDURE ADD_USER
(LStaffNo IN LECTURER.STAFFNO % TYPE,LUsername IN LECTURER.USERNAME %TYPE, LPassword IN LECTURER.PASSWORD % TYPE,LName IN LECTURER.NAME % TYPE, LSurname IN LECTURER.SURNAME % TYPE )
Quote:
EXEC ADD_USER
Quote:
PLS-00306: wrong number or types of arguments in call to 'ADD_USER'
Don't you see the difference?

Where are the parameters in the procedure call?

By
Vamsi
Re: Problem with stored procedures [message #263862 is a reply to message #263851] Fri, 31 August 2007 03:34 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First,
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Then, you called add_user without any parameter and declared it with 6 parameters (I think). What did you expect from Oracle other than raising an error?

Regards
Michel
Previous Topic: create user
Next Topic: how to give user inputs through procedure
Goto Forum:
  


Current Time: Mon Dec 05 23:53:37 CST 2016

Total time taken to generate the page: 0.08694 seconds