842106 wrote:Try to move the header_close procedure to the end of your routine and see if that changes anything.
Thanks all for your reply . Actually I need to create a fake cookie from oracle BE and try to retrieve values from it. I have modified my query and removed exceptions
If the cookie is not there you should get a no_data_found error.
Edited by: Sven W. on Oct 23, 2012 3:02 PM
owa_cookie.send( name=>'SESSION1', value=>'344433', expires=> sysdate+2 );
842106 wrote:As Billy indicated.. cookies are related to web browsers. PL/SQL code within a database is not a web browser, so it has no concept of "cookie" storage. The cookie functionality provided by PL/SQL is to, in principle, communicate with the web browser to get it to create the cookie.
So is it not possible to create a real cookie and retrieve value from non apex or CGI environment ?
842106 wrote:The error is due to the cookie not being found.
Now as per your comment I have created a simple OWA environment and executed the below code . Now I am getting no data found error
ORA-01403: no data found
ORA-06512: at line 23
/** Initialize */
owa.cgi_var_name (1) := 'something';
owa.cgi_var_val (1) := 'else';
owa.init_cgi_env (1, owa.cgi_var_name, owa.cgi_var_val);
/** End Initialize */
ourCookie := owa_cookie.get('SESSION1');
v_session := ourCookie.vals(1);
So is it not possible to create a real cookie and retrieve value from non apex or CGI environment ?Yes it is. But the web browser is non-existant. So you need to create the CGI environment that the web server would have created, prior to calling your web enabled PL/SQL code.