0

This is the procedure:

create or replace
PROCEDURE INSERTUSER(
       username IN USERS.USERNAME%TYPE,
     password IN USERS.PASSWORD%TYPE,
       firstname IN USERS.FIRSTNAME%TYPE,
       lastname IN USERS.LASTNAME%TYPE,
     role IN USERS.ROLE%TYPE,
     banstatus IN USERS.BANSTATUS%TYPE,
     verifystatus IN USERS.VERIFYSTATUS%TYPE)
AS
BEGIN

  INSERT INTO USERS ("USERNAME", "PASSWORD", "FIRSTNAME", "LASTNAME", "ROLE", "BANSTATUS", "VERIFYSTATUS") 
  VALUES (username, password, firstname, lastname, role, banstatus, verifystatus);

  COMMIT;

END;

and when I try to call it in OracleSQL:

call INSERTUSER(Dean, pass1, Bob, Smith, Admin, 0, 1)

I get the error message:

Error starting at line 1 in command:
call INSERTUSER(Dean, pass1, Bob, Smith, Admin, 0, 1)
Error report:
SQL Error: ORA-06576: not a valid function or procedure name
06576. 00000 -  "not a valid function or procedure name"
*Cause:    Could not find a function (if an INTO clause was present) or
           a procedure (if the statement did not have an INTO clause) to
           call.
*Action:   Change the statement to invoke a function or procedure

Can you guys spot any obvious mistakes/problems? I'm not really sure I'm getting this error message..

4

2 回答 2

1

您可以像这样调用您的程序:

begin
   INSERTUSER('Dean', 'pass1', 'Bob', 'Smith', 'Admin', 0, 1);
end;
于 2013-07-31T11:39:37.470 回答
0

发现问题!调用函数时必须使用单引号而不是双引号!

于 2013-07-31T11:42:21.493 回答