Session Issue

rajaselvam26

New Member
Hi All,

I need to maintain a value (ie.. User ID) through out the Application.
My Scenerio is After Logged in to the application, I need to maintatin the Logged User Id through out the Application. I think this is possible of storing the user Id in the Session. But I dont know how to set sessions and get the values from session. Kindly give me some samples of storing the values in Session.

Rajaselvam. M
 

dayv2005

Member
Idk if this is what you are aiming for but have you tried using this

display userid(ldbname(1)).

This will display the user id of the current session.
 

tamhas

ProgressTalk.com Sponsor
You mention userid, which you don't really need to store, since it is always available. But, if you have other values which you need to hold for the session, what you need is a session super-procedure, pseudo-singleton, or true singleton, depending on version.
 

rajaselvam26

New Member
Hi tamhas,

Can you give me some samples for session super-procedure, pseudo-singleton, or true singleton. And Also suggest me which is the better option?

Thankx in Advance...

Rajaselvam. M
 

Casper

ProgressTalk.com Moderator
Staff member
Can you give me some samples for session super-procedure, pseudo-singleton, or true singleton. And Also suggest me which is the better option?

session:super, pseudo singleton(10.1A+) and true singleton (10.1C+) are just technical implementations. What Thomas means is that in order to maitain context between sessions you should make yourself a sesion manager/contextmanager which handles this for you.

I don't know if there are any good examples of this available. There are some examples available @psdn )search for context manager and you will find a bunch of information), but they might be overly complicated for your situation.

HTH,

Casper
 

tamhas

ProgressTalk.com Sponsor
Casper is right, the choice of which of the three approaches you use depends on your version. You will find several examples of managers in the Components and Managers section on OEHive.org and the pseudo-singleton approach is documented in the OOABL section.
 
Top