This discussion is archived
3 Replies Latest reply: Dec 6, 2010 5:11 AM by 690088 RSS

Global Variable in Oracle Forms 6i

690088 Newbie
Currently Being Moderated
Hi,

How & where to define global variable in Oracle form 6i and also let me know how to access it.


Thanks in advance

Regards,
Sanket
  • 1. Re: Global Variable in Oracle Forms 6i
    527733 Pro
    Currently Being Moderated
    Global variables are not formally declared the way PL/SQL local variables are. Rather, you initialize a global variable the first time you assign a value to it:

    :GLOBAL.my_var := TO_CHAR(:order.total * .85);



    For more information search online help ..
  • 2. Re: Global Variable in Oracle Forms 6i
    Amatu Allah Guru
    Currently Being Moderated
    hi

    Global variable are forms specifice variable.
    it can store character value upto 255 for all usages.
    We can initialize it when we declare otherwise give error if we did not assign it any value.
    Oracle 10g it can take upto 4000 bytes
    GLOBAL.ur_globalvar := TO_CHAR(15);
    
    or
    
    :GLOBAL.ur_globalvar:= '15';
    
    or 
    
    Remmber numeric values are implicitly converted by oracle 2 character
    
    :GLOBAL.ur_globalvar:= 15;
    
    -- which can then subsequently be accessed using...
    
    :GLOBAL.ur_globalvar;
    
    
    -- To destroy a global variable and release its memory, use the ERASE built-in procedure:
    
    Erase('GLOBAL.my_var'); 
    Regards,

    Abdetu...
  • 3. Re: Global Variable in Oracle Forms 6i
    690088 Newbie
    Currently Being Moderated
    Thanks All for your response.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points