Setting a variable package on logon

Last post 09-10-2007 3:58 AM by ypcing. 1 replies.

Sort Posts:

  • Idea [Idea] Setting a variable package on logon

    09-06-2007, 11:48 PM
    • Member
      point Member
    • jflopezv
    • Member since 09-07-2007, 2:52 AM
    • Posts 1
    Hello All,I have this problem:

    I have many tables that have a field to identify users data ("ME" field) and for each table there is a view that filter the data for that user (user logged on). Here's an example of a table with it's view:

    CREATE TABLE esquema_me   (codigo                     VARCHAR2(3) NOT NULL,    descripcion                VARCHAR2(50) NOT NULL,    me                    number NOT NULL)/ CREATE OR REPLACE VIEW esquema (   codigo,   descripcion) ASSELECT a.codigo, a.descripcion  FROM cmp_esquema_me a WHERE me = session_info.getmultisession/Here is the code of the SESSION_INFO package:CREATE OR REPLACE PACKAGE session_info IS   MultiSession number := 0;  function GetMultiSession return number;  procedure SetMultiSession(nData number);END; -- Package spec/ CREATE OR REPLACE PACKAGE BODY session_info IS   function GetMultiSession return number is   begin      return MultiSession;   end;      procedure SetMultiSession(nData number) is   begin      MultiSession := nData;   end;END;/ As you can see, the data returned from the view depends on the MULTISESSION package variable value.

    I would like to know if the database session established at first remains all the user web session, so I just need to set the variable once, and all data returned belongs that user for along database session. In other case, I’d have to set that variable on each query to database.

    When i use datasource control binding with no code,  how asp.net manage the connection to database?? Does it connect every time that the control queries data?

    I'll appreciate your suggestions 

    Thanks in advanced,Fernando 

     

  • Re: Setting a variable package on logon

    09-10-2007, 3:58 AM
    • Member
      235 point Member
    • ypcing
    • Member since 01-30-2006, 2:02 AM
    • Singapore
    • Posts 49

    How does that matter....can you explain your query bit more. do you want to query specifi view based on user logon?, you have tables/views in different oracle schemas?

    B'Rgds,
    Yash

    Dont forget to click "Mark as Answer" on the post that helped you.
Page 1 of 1 (2 items)