Я создал один пакет в oracle apex. Во время компиляции я получил сообщение об ошибке, подобное этому ...
пожалуйста, помогите мне.
create or replace package body "PKG_APP_SECURITY" is
procedure ADD_USER(P_PASSWORD IN VARCHAR2
,P_USERNAME IN VARCHAR2
)
as
begin
INSERT INTO P_USERS(username, password)
VALUES (UPPER (p_username),get_hash(TRIM(p_username), p_password));
COMMIT;
EXCEPTION
WHEN OTHERS THEN ROLLBACK; RAISE;
end ADD_USER;
function VALID_USER(P_PASSWORD IN VARCHAR2
,P_USERNAME IN VARCHAR2
) return BOOLEAN
as
begin
VALID_USER2(UPPER(p_username),p_password);
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN RETURN FALSE;
end VALID_USER;
function GET_HASH(P_PASSWORD IN VARCHAR2
,P_USERNAME IN VARCHAR2
) RETURN VARCHAR2 AS
BEGIN
RETURN
DBMS_OBFUSCATION_TOOLKIT.md5(input_string => UPPER (p_username) || '/' || UPPER (p_password));
end GET_HASH;
procedure LOGIN(P_FLOW_PAGE IN VARCHAR2
,P_PASSWORD IN VARCHAR2
,P_SESSION_ID IN VARCHAR2
,P_USERNAME IN VARCHAR2
)
is
begin
-- THIS PROVIDES AUTHENTICATION
wwv_flow_custom_auth_std.login
(p_uname => p_uname
,p_password => p_password
,p_session_id => p_session_id
,p_flow_page => p_flow_page || ':' || 1);
end LOGIN;
procedure VALID_USER2( P_PASSWORD IN VARCHAR2
,P_USERNAME IN VARCHAR2
)
as
begin
SELECT '1'
INTO v_dummy
FROM P_USERS
WHERE UPPER(username) = UPPER (p_username)
AND password= get_hash (p_username, p_password);
EXCEPTION
WHEN NO_DATA_FOUND THEN
raise_application_error(-20000, 'Invalid username / password.');
end VALID_USER2;
end "PKG_APP_SECURITY";