Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

create cookie using pl sql and retrieve values

845109Oct 23 2012 — edited Oct 25 2012
Hi ,
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
This post has been answered by Billy Verreynne on Oct 23 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2012
Added on Oct 23 2012
11 comments
4,508 views