PL/SQL - Incorrect number of argument types in the call

Asked

Viewed 3,824 times

1

I’m having trouble with a simple function I created.

create or replace FUNCTION dry_login (
    username IN VARCHAR2,
    password IN VARCHAR2 )
RETURN BOOLEAN
IS
    l_user varchar2(70);
    l_pwd  varchar2(70);
BEGIN
  SELECT usuario_nome, usuario_senha
    INTO l_user, l_pwd
    FROM dry_usuario
  WHERE usuario_nome = username;

IF (l_pwd = password) and (l_user = username) THEN
    RETURN TRUE;
ELSE
    RETURN FALSE;
END IF;
EXCEPTION
    WHEN NO_DATA_FOUND THEN RETURN FALSE;
END;

From the following error:

ORA-06550: row 4, column 23: PLS-00306: incorrect number of argument types in call to 'DRY_LOGIN' ORA-06550: row 4, column 1: PL/SQL: Statement Ignored

Somebody help me find this mistake, please. Thank you. Att Oliver

  • How and where is calling this function?

  • It is in APEX.

  • The error is not in the function but in the function call, if you can include the copy of the call to the function, with the environment variables indicated in APEX is easier to identify the possible error.

  • Which arguments you pass in the function call?

1 answer

2

I looked at APEX and saw that the name of the parameter is already defined in the method call. Here’s the tip if anyone needs it, I made the following change.

create or replace FUNCTION dry_login (
    p_username IN VARCHAR2,
    p_password IN VARCHAR2 )

Thank you for all your attention and help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.