Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2004
    Posts
    51

    Unanswered: GLOBAL TEMPORARY TABLES problem

    Hi
    This doubt pertains to Oralce forms and Triggers
    I have a form which is calling a Trigger
    This form can be accessed by many users at a time.
    I want to create a variable which would be different for different instances of the form
    For this I used the global temporary table
    I am able to get the values of inserted record in the global temporary table in the form. But when I try to access this record from the Trigger I get no rows
    What might be the problem?

    PS: Using sessions is also the solution but I am not looking to use sessions

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    In forms the easiest way to hold variables is to define a global variable. It is refered to as
    :GLOBAL.name

    Check the help in forms.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    May 2004
    Location
    BA [ARG]
    Posts
    137
    When you created this global temp table, have you explicit the behaviour of the table??
    Code:
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT PRESERVE ROWS;
    Otherwise, the table would be created as "ON COMMIT DELETE ROWS".

    Check this link

  4. #4
    Join Date
    Dec 2003
    Posts
    1,074
    One alternative to a GLOBAL TEMPORARY TABLE for this particular need (ie the storage of a single value) is to create a package spec with a variable (or add a PACKAGE BODY and use SET and GET functions to set & retrieve the variable's value).

    That will allow you to maintain a unique value for each session connected to the database.

    -Chuck

  5. #5
    Join Date
    Nov 2004
    Posts
    51
    Thanks that helped
    SET and GET is also working

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •