Setting 'something' in session

Dear All,
I have an application which connect to an Oracle 9i R2 database. The data held in the tables is (for example) for entire country. When a user logs into my application, I open a connection to oracle, I want this session to always have a preferred country (like england scotland etc) so that whenever John Smith logs in, this attribute gets set to england whereas is John Smith_1 logs in, this attribute gets set to scotland.
This is not something which is differentiated by roles. Can I set such default values for a particular session? Can anybody guide me to simple tutorials?
My application is written in .NET and I connect to oracle using ODP .NET
Regards,
SP

Hi!
You can use create_context to create a context and sys_context to read it. It is explained in the SQL Reference Guide.
Regards,
Petra

Similar Messages

  • Setting a Default Session

    It appears that while you can create a customized work space in Audition CS5.5 you can no longer set a default session.  In 3.0 I was able to create a session with a custom number of tracks, set effects on tracks and save that as a default session so that I would not have to set my session up the same way every time (which is helpful to me be in a voice track only environment).  Am I missing something, or is this no longer a feature?  It also appear that you can no longer set the default view of the workspace as it related to minutes (it shows 30 seconds by default).  Attempting to set the View/End setting to, say, 1 minute is not possible.

    Hello,
    I'm confused by this as well. Really no way to save a template /default session? Why would Adobe remove such a vital feature?

  • Hi I have two questions. I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users? How is the session timeout set? Thanks, YS

     

    <i>I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users?</i>
    Um, there is no such thing as NAS4.1.
    I'm assuming that you mean NAS4.0 (maybe NAS4.0sp1?). If so, then the session timeouts are specified in the session section of the NTV configuration files.
    AFAIK, you can specify session timeouts on a per user basis.

  • When closing Firefox, after reopening it, my tabs are gone, even though I have Firefox set to remember session.

    When closing Firefox, after reopening it, my tabs are gone, even though I have Firefox set to remember session. However, after several hours and opening and closings of Firefox, it will open tabs from the old session, for no apparent reason.

    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox profile folder that store session data.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox profile folder.
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Multiple_profile_files_created
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible).
    In case you are using "Clear history when Firefox closes":
    *do not clear the Browsing History
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.

  • I have three iPhones using the same iTunes account, can we set something so that we are not all getting everyones txt messages to all phones?

    I have three iPhones using the same iTunes account, can we set something so that all our txt messages are not appearing on all phones?

    Settings > Messages > Receive At...
    Any iPhone that lists the same email will receive the same texts. This has to be changed in order to stop receiving on all devices.

  • Code to set and destroy session variables in Java Server Pages(JSP)

    code to set and destroy session variables in Java Server Pages(JSP)
    we have use following statement to set session variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session variable
    session.setAttribute("userClient","");
    and
    the session.invalidate() is not working
    Plz. solve this probem

    code to set and destroy session variables in Java
    Server Pages(JSP)
    we have use following statement to set session
    variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session
    variable
    session.setAttribute("userClient","");Perhaps if you tried using
    session.setAttribute("userClient", null);
    or
    session.removeAttribute("userClient");
    and
    the session.invalidate() is not workingNot working how?
    >
    Plz. solve this probem

  • How to set a new session variable?

    Hi all,
    Can anybody say how to set a new session variable in istore?

    Hi,
    you can use either
    pageContext.getAttribute(VAR, PageContext.REQUEST_SCOPE);
    or
    <%@page session="true" %>
    session.putValue
    session.getValue
    Hope this will help.
    Thanks
    Gurjeet

  • Set up a Session Variable

    Hi,
    How to setup a session variable of User id in PHP in
    Dreamweaver Style. Is it possible to assign the session variable
    value equal to user id from the recordset......if yes i need the
    procedure. Thanks in advance.

    prashi123 wrote:
    > How to setup a session variable of User id in PHP in
    Dreamweaver Style. Is it
    > possible to assign the session variable value equal to
    user id from the
    > recordset......if yes i need the procedure.
    There is no "Dreamweaver style" for setting up a session
    variable. You
    do it in exactly the same way as for any PHP page. Put this
    at the
    beginning of the page:
    session_start();
    Retrieve the value that you want from the recordset and
    assign it to a
    session variable like this:
    $_SESSION['user_id'] = $row_recordsetName['user_id'];
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • Setting image in session

    Hi,
    Is there any possible way to set photos into session using struts action in servlet and retrieve using struts in jsp??
    pls tell me a way for struts 1x...
    Thanks in advance
    Edited by: bravery on Mar 18, 2010 2:19 PM

    Ok. So first of all You have to store images in a special folder or in database. Storing them in special folder is easier at the begining but probably later You'll change it to database. Then, when user logs in You put am image_id attribute in session. To get session object use request.getSession() method, to save attribute in session use session.setAttribute() method. It'll be similar to:
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
         HttpServletRequestWrapper request = new HttpServletRequestWrapper(req);
         // validate user
         HttpSession session = request.getSession();
         session.setAttribute("image_id", "image id for the user");
    }Then write a servlet that will return an image (in bytes) for specified id. Here is an example. Then in your jsp code just put an img tag with src attribute pointing to your image servlet.
    <img src="/image_servlet?image_id=${sessionScope.image_id}/>
    {code}
    That's all in general.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • Setting and retrieving session using pl/sql

    How to set and retrieve session using pl/sql?Can anyone help me?

    mrs wrote:
    create or replace
    function get_login_details(in_user in VARCHAR2,in_pwd in VARCHAR2,in_cname in VARCHAR2)
    ..snipped..The code should look as follows:
    create or replace function AuthenticateUser( userName varchar2, userPassw varchar2, userGroup varchar2 )
    return integer is
      i integer;
    begin
      --// purpose of the SQL is simply to check if such a row exist -
    --// no data from the row needs to be fetched
      select 1 into i from acl_users_gv
      where user_name = userName
      and password = userPassw
      and entity_group_name = userGroup;
      --// if the SQL succeeded, then the row exists and matches
      --// the authentication details
      return( 0 );
    exception when NO_DATA_FOUND then
      --// SQL failed to find a row - authentication details do
      --// not exist
      return( 1 );
    end;No need to fetch data unnecessarily. No need too check the fetched data when the column values are already checked via the SQL filter condition (predicate).
    No need to return a flag variable as a freely formatted text string containing Successful Login and login failed. That is not a robust design to use a string variable like that. Use boolean for true/false. Or use integer values 0/1.
    This is my function get_login_details.And I need to get this 'o_mesg' in other java file also.Standard PL/SQL call from Java. The SQL string to execute contains an anonymous PL/SQL and needs to use bind variables. E.g.
    begin
      :result := AuthenticateUse( :userName, :userPassw, :userGroup );
    end;
    Can you suggest the right way, how I can get this variable in other pages?That depends on whether there is database session state. If there is, authentication can be done once only via a trusted context, that specifies whether the session is authenticated.
    If this is done from an app server that uses a db session pool and stateless db sessions, the state needs to be kept in the app server.
    Do you understand what stateful versus stateless db sessions are, and what the differences are?

  • Using Suri asking any localised question in the UK, it responds with 'cannot help' can only use US locations etc. and in US English. Have I missed something or set something up incorrectly? I also thought it would interface with your Facebook but it just

    Using Suri asking any localised question in the UK, it responds with 'cannot help' can only use US locations etc. and in US English. Have I missed something or set something up incorrectly? I also thought it would interface with your Facebook but it just comes back with a 'I can't help you with Facebook' message

    Yeah, Siri - a headline feature on the iPhone 4s page - is beta at the mo.
    But then anyone who's used Macs for a few years will know that most new software is pretty much still in beta when it's released anyway. Only Apple could get away with it and retain customers

  • Using HttpHeader to set value for session variables

    Hi,
    We want to set values for 2 session variables (USER and ROLEID) using HttpHeader in obiee 11g. Has anyone tried this? How can we achieve this?
    I found the below note on the forum for setting value for the USER session variable. how can we set the ROLEID session variable also? is it possible to set values for 2 variables?
    for setting the USER session variable,
    You should add this in $BI_HOME/bifoundation/web/display/authenticationschemas.xml:
    <SchemaKeyVariable source="httpHeader" nameInSource="Proxy-Remote-User" forceValue="SSO"/>
    <AuthenticationSchema name="SSO" displayName="Single Sign On" userID="IMPERSONATE" proxyUserID="NQ_SESSION.RUNAS" options="noLogoffUI noLogonUI">
    <RequestVariable source="httpHeader" type="auth" nameInSource="Proxy-Remote-User" biVariableName="IMPERSONATE" options="required"/>
    </AuthenticationSchema>
    Please suggest.
    Thanks.

    I think maybe your SnmpValue type or value is not corrent.
    1.3.6.1.4.1.7064.201.1.200.100.0 is Enum control type
    when I use
    SnmpValue val = new SnmpString("0");
    It doesn't work, but when I use
    SnmpValue val = new SnmpInt(0);
    It works. I think the JDMK should give some warning message when the type is not correct. :)
    The code is following:
    final SnmpVarBindList setList = new SnmpVarBindList(" set varbind list ");
    SnmpOid oid = new SnmpOid("1.3.6.1.4.1.7064.201.1.200.100.0");
    SnmpValue val = new SnmpInt(0);
    SnmpVarBind valueBind = new SnmpVarBind(oid, val);
    setList.addVarBind( valueBind );
    SnmpRequest setRequest = session.snmpSetRequest(null, setList);

  • I can't get my screen to roll over when I turn phone on the side. It used to work, I might have set something wrong   thanks

    I can't get my screen to roll over when I turn phone on the side. It used to work, I might have set something wrong   thanks

    You may have locked the screen. Open Control Center by sliding up with one finger from below the bottom of the home screen. The orientation lock control is at the far right of the top row in Control Center (looks like a lock surrounded by a circular arrow). If it is on, the same icon will be in the menu bar. Also note that not all screens will rotate -- the home screen for example will not.

  • How to Set URL-Based Session Tracking to No

    Dear BSP Gurus
    I am fairly new to BSP applications, but I am getting an error which goes "BSP exception: Access to URL /sap(bD1lbiZjPTEwMCZkPW1pbg==)/bc/bsp/sap/crm_ui_frame/ is forbidden" and notice some say they solved it by Setting URL-Based Session Tracking to No, so my question is how do I do that.
    Unless off course there is another way to solve my problem. Would greatly appreciate it.
    Awaiting your favorable response

    Hey Raja and Rajani
    I actually activated all the applications below SAP->BC->->SAP-> **(Application)*->  but still I am getting that error.
    When I then test the individual applications I get errors like
    "BSP Exception: Das Objekt default.htm in der URL /sap/bc/bsp/sap/bp_cont_main/default.htm?sap-client=100&sap-sessioncmd=open ist nicht gültig"
    I really have run out if ideas, I need your assistance, initially I thought it cd be the logical link coz the work centres appear fine then I tried to assign even standard business roles, its giving the same error.
    What do I do now?

Maybe you are looking for