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: Anyone has experience using OAS building Web applications ? PROBLEM: Web client session - retaining values during session life.

Re: Anyone has experience using OAS building Web applications ? PROBLEM: Web client session - retaining values during session life.

From: Tom Zamani <tom_at_taten.com.au>
Date: Wed, 13 Oct 1999 13:32:07 +1000
Message-ID: <7u0uh6$45h$1@perki.connect.com.au>


Keso
In OAS every database access is a session, so each time you access the database it starts from 0 and therefore you get 1. One way to over come this issue is by using Sequence, beacuse the squence is stored in the database it would be ok.
Like
CREATE SEQUENCE NEXTID
START WITH 1
INCREMENT BY 1
MINVALUE 1
CACHE 20
NOCYCLE ; where you have > nCount := NVL(nCount, 0) + 1; should be changed to select nextid.nextval into nCount from dual;

if you need to select the current value of the index then use select nextid.currtval into nCount from dual; I think this will work

Tom

keso wrote in message <7tvh0m$4vt$1_at_bagan.srce.hr>...
>Seems like nobody knows, but i'll still ask ...
>
>What solution should i implement for session variables (Web browser
session,
>not oracle session) - variables that retain their values during client
>session ?
>(I don't want to use cookies)
>
>I wrote simple test procedure:
>
>CREATE OR REPLACE package test as
> nCount number;
> procedure session_test;
>end;
>/
>
>CREATE OR REPLACE package body test as
>
>procedure session_test is
>begin
> htp.p('old value of counter: ' || TO_CHAR(nCount));
> htp.para;
> nCount := NVL(nCount, 0) + 1;
> htp.p('increased counter value: ' || TO_CHAR(nCount));
>end;
>
>end;
>/
>
>Procedure 'session_test' should increase counter each time it is called by
>URL and write the old and new values.
>But it yields always the SAME value!! :(, no matter how many times i call
it
>again by REFRESH button on my browser!!!
>
>Browser response:
>
>old value of counter: <- nothing because of null value
>increased counter value: 1
>
>----------------------------------
>I set 'Client Sessions' to 'Enabled' (one of Web parameters of my OAS
PL/SQL
>application)
>and 'Max session idle time' to 600 and restarted OAS, but it doesn't work.
>No trace nor voice of client sessions.
>
>Am i doing something wrong?
>How i should solve this?
>
>please help,
>
>Vedran
>
>
>
Received on Tue Oct 12 1999 - 22:32:07 CDT

Original text of this message

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