create cookie using pl sql and retrieve values
845109Oct 23 2012 — edited Oct 25 2012Hi ,
I am currently in an urgent need to create cookie from oracle BE and also read values from it . I have tried to use below code . its showing error
code
DECLARE
ourcookie owa_cookie.cookie;
BEGIN
ourCookie := owa_cookie.get('SESSION2');
END;
/
BEGIN
owa_util.mime_header('text/html', FALSE);
-- Create a cookie
owa_cookie.send(
name=>'SESSION',
value=>'344444',
expires=> sysdate+2,
path=>'/');
owa_util.http_header_close;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
But when I am trying to read from the cookie I have created I am unable to perform
--- this is for reading cookies
DECLARE
ourcookie owa_cookie.cookie;
BEGIN
ourCookie := owa_cookie.get('SESSION2');
END;
/
error :
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 325
ORA-06512: at "SYS.OWA_COOKIE", line 36
ORA-06512: at "SYS.OWA_COOKIE", line 140
ORA-06512: at line 4