PDA

Click to See Complete Forum and Search --> : Global variable lose value


ramdasv
Jan 10th, 2000, 03:53 AM
We have an IIS application done using Webclass. We have a global variable which get the value from the global.asa
We have htm templates which uses webtags and xml to load data.
After leaving the page unatteded for some time and when we tried to load XML it fails.
We tried to set the session.timeout to 120
But it didnt work. We found that the global variable is not retaining its value.
This variable is delcared as public in a module and is assigned value from the applicaiton object.

I would appreciate if some one could help me in finding the reason and a solution for it.
Thanks
Ramdas

KENNNY
Jan 10th, 2000, 06:50 AM
strange.. from what i know it should retain its value, as it's declared as Public at Module level.
You could try declaring it as Static, so even if it did go out of scope, it would retain it's value.
eg.

Static MyVar as Integer

------------------
cintel rules :p
www.cintelsoftware.co.uk

Tonio169
Jan 10th, 2000, 02:41 PM
did you pass that global variable in a function or a procedure? if so, maybe you passed it byref instead of byval.

ramdasv
Jan 12th, 2000, 05:46 AM
I didnt pass it to functions.
since it being a global variable it is directly referred in functions.

I am wondering whether making dll using webclass is going to handle global variables in a different way?

Thanks

LeoDai
Feb 26th, 2000, 11:58 PM
Try to use cookies to store the global values