Package Specification varaible [message #658227] |
Wed, 07 December 2016 06:32 |
|
saipradyumn
Messages: 419 Registered: October 2011 Location: Hyderabad
|
Senior Member |
|
|
Hi
I had defined the few global variables in the Package Specification.One of the main procedure is initializing some values into those variables.
In the main procedure we are calling different sub procedures. But unfortunately some times global variables are becoming null & Some times i am able to get the value which I initialized in my main procedure .
Could you please let me know functionality of the variable which is defined in spec & initialized in the one procedure.
Thanks
SaiPradyumn
|
|
|
|
|
|
Re: Package Specification varaible [message #658305 is a reply to message #658302] |
Thu, 08 December 2016 06:36 |
|
Michel Cadot
Messages: 68665 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
"global variables defined in the package specification" are very simple: they are variables that are included in your session.
So the cookiemonster's question, do you use a connection pool?
Which means does your session can be reused by someone else or can you be reassigned to another session?
[Updated on: Thu, 08 December 2016 06:37] Report message to a moderator
|
|
|
|
Re: Package Specification varaible [message #658307 is a reply to message #658227] |
Thu, 08 December 2016 06:46 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
saipradyumn wrote on Wed, 07 December 2016 12:32
But unfortunately some times global variables are becoming null & Some times i am able to get the value which I initialized in my main procedure .
Clearly describe the scenarios where one happens and when the other happens. i.e. Is it always the same procedures that the variable is null and the same procedures where it has the variable populated? Or can the same procedure sometimes have a null and sometimes be populated.
How are you identifying the value of the variable during each procedure call?
|
|
|
|
|
|
Re: Package Specification varaible [message #658323 is a reply to message #658320] |
Fri, 09 December 2016 08:38 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
saipradyumn wrote on Fri, 09 December 2016 14:06 Hi ,
It's not the same procedure always.To identify global parameter values i had created the my own table and inserting global parameter value into that table .Some times tat test have the value and some times it doesn't have the value:
So what are the conditions under which procedure A(for want of a better term) 'has the value' and what are the conditions when it doesn't.
As Blackswan has said, you're not giving us much to go on.
It sounds to me like you are calling the procedure in different sessions and in one session you are first populating the variable in question, but in the other you are not, but that's a guess based on very limited info.
|
|
|
|
|
|
|