Results 1 to 5 of 5

Thread: Global variable lose value

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    India
    Posts
    85

    Post

    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

  2. #2
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    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
    www.cintelsoftware.co.uk

  3. #3
    Lively Member
    Join Date
    Jul 1999
    Posts
    99

    Post

    did you pass that global variable in a function or a procedure? if so, maybe you passed it byref instead of byval.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    India
    Posts
    85

    Post

    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

  5. #5
    New Member
    Join Date
    Feb 2000
    Location
    UK
    Posts
    1

    Post Global variable lose value

    Try to use cookies to store the global values

Posting Permissions

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



Click Here to Expand Forum to Full Width