Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: getting cookies with owa.cookie cartridge

Re: getting cookies with owa.cookie cartridge

From: <bonanos_at_yahoo.com>
Date: Wed, 22 Jul 1998 06:09:06 GMT
Message-ID: <6p3vm3$dk3$1@nnrp1.dejanews.com>


In article <35B50DB3.F932B791_at_purdue.edu>,   eschlene_at_purdue.edu wrote:
> I'm trying to retrieve the value of a cookie from the browser during a
> PL/SQL stored procedure. I've read the documentation and still can't
> make it work. Anyone have a working example of how this is done?
>

Eric

Here are to procedure that read and write cookies

--WRITE

COOKIE-----------------------------------------------------------------
PROCEDURE SET_COMPANY_COOKIE (compcode in varchar2,acronym in varchar2)is

BEGIN

		owa_util.mime_header('text/html', FALSE);
		owa_cookie.send('compcode',compcode);
		owa_cookie.send('acronym',acronym);

		owa_util.http_header_close;

END;

--READ COOKIE----------------------------------------------------------
CREATE OR REPLACE PROCEDURE GET_COMPANY_COOKIE is

ccompany owa_cookie.cookie;
cacronym owa_cookie.cookie;

BEGIN ccompany := owa_cookie.get('compcode'); cacronym := owa_cookie.get('acronym');

IF (ccompany.num_vals > 0) THEN
htp.p('<center>');

    htp.p('<table border=0 cellspacing=0 cellpadding=0 width=600>');

		htp.p('<TR>');
			htp.p('<TD align=left valign=top>');
				htp.fontOpen( ccolor => '#ff0000', cface =>
'Arial', csize => '0');
					htp.Strong('Company: ');

htp.p(htf.strong(lower(Initcap((cacronym.vals(1))))));
				htp.fontclose();
			htp.p('</TD>');
		htp.p('</TR>');
	htp.tableclose;

htp.p('</center>');

...etc...etc



---

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Jul 22 1998 - 01:09:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US