Home » Developer & Programmer » Forms » Accessing a variable
Accessing a variable [message #204016] Fri, 17 November 2006 05:58 Go to next message
rabhavani
Messages: 8
Registered: June 2006
Location: HYDERABAD
Junior Member


Hi,

I have declared a global variable in a package specification.
And i want to access that through oracle forms..

Please let me know how can i do this

Regards
Bhavani
Re: Accessing a variable [message #204181 is a reply to message #204016] Sat, 18 November 2006 12:21 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Use it just like you'd use a procedure or a function which is declared in a package: precede variable's name with package name, for example

PKG_TEST.MY_VARIABLE
Re: Accessing a variable [message #204264 is a reply to message #204016] Sun, 19 November 2006 22:24 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please post code associated with "declared a global variable in a package specification".

Is that a Global or a global?

David
Re: Accessing a variable [message #204282 is a reply to message #204016] Sun, 19 November 2006 23:37 Go to previous messageGo to next message
rabhavani
Messages: 8
Registered: June 2006
Location: HYDERABAD
Junior Member


Hi

we cannot call a variable declared in the package through
forms6i directly,

Instead we can define a table type variable and use that

Thanks
Bhavani
Re: Accessing a variable [message #204286 is a reply to message #204282] Sun, 19 November 2006 23:54 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Forms 6i CAN invoke a function in the package that will return the contents of the package variable. It can also call another function that will store a value into a package variable.

Foe example, ":blk.itm := my_pkg.get_var1;" where 'get_var1' is simply "function get_var1 return varchar2 is begin return(body_var); end;"

David
Previous Topic: Installing forms etc
Next Topic: How to Solve this COUNT problem
Goto Forum:
  


Current Time: Tue Dec 06 10:29:25 CST 2016

Total time taken to generate the page: 0.14325 seconds