Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:40 AM
K B
Guest
 
Posts: n/a
Default Global asa refresh



I have an application that loads an array in the global ASA file.
Sometimes that array gets lost for no real reason, resulting in a ubound
error. MS has a solution which involves removing virus-scanning and
backup procedures...which is not an option.

My question is simple...is there ANY way to force the Global.ASA to
relaod that array? Currently I have to go in and edit the global.asa,
add a few spaces and then backspace and save and it causes a reload.

I could easily check if the variable exists, but if it does not I do not
know where to go.

thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2  
Old July 19th, 2005, 11:40 AM
Roy Danon
Guest
 
Posts: n/a
Default Re: Global asa refresh

I'm not sure i understand what you're saying but i'll give it a try.

I believe you're using an application variable to store the array,
When you're using the array on an ASP page Check if the variable isNull, if
true create the array again on the same page,
If false, continue.


Roy.

"K B" <nottelling@yahoo.com> wrote in message
news:%23C3twDz6DHA.2056@TK2MSFTNGP10.phx.gbl...[color=blue]
>
>
> I have an application that loads an array in the global ASA file.
> Sometimes that array gets lost for no real reason, resulting in a ubound
> error. MS has a solution which involves removing virus-scanning and
> backup procedures...which is not an option.
>
> My question is simple...is there ANY way to force the Global.ASA to
> relaod that array? Currently I have to go in and edit the global.asa,
> add a few spaces and then backspace and save and it causes a reload.
>
> I could easily check if the variable exists, but if it does not I do not
> know where to go.
>
> thanks
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]


  #3  
Old July 19th, 2005, 11:40 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: Global asa refresh

Use an #include file in the global.asa, and this is where you create your
array. The #include file looks like this:

<script language = vbscript runat = server>
function buildArray()
dim myArray(2)
myArray(0) = "a"
myArray(1) = "b"
myArray(2) = "c"
application("myArray") = myArray
end function
</script>

Then in global.asa:

<script language = vbscript runat = server>
sub application_onstart()
buildArray()
end sub
</script>

Then have an #include file, included in EVERY page that will need the array,
that does this:

<!--#include file = buildArray.asp -->
<script language = vbscript runat = server>
myArray = application("myArray")
if not isArray(myArray) then buildArray()
</script>

Or, you could just rebuild the array on every page that needs it, if it's
static enough that you just want to rebuild it if it disappears.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




"K B" <nottelling@yahoo.com> wrote in message
news:#C3twDz6DHA.2056@TK2MSFTNGP10.phx.gbl...[color=blue]
>
>
> I have an application that loads an array in the global ASA file.
> Sometimes that array gets lost for no real reason, resulting in a ubound
> error. MS has a solution which involves removing virus-scanning and
> backup procedures...which is not an option.
>
> My question is simple...is there ANY way to force the Global.ASA to
> relaod that array? Currently I have to go in and edit the global.asa,
> add a few spaces and then backspace and save and it causes a reload.
>
> I could easily check if the variable exists, but if it does not I do not
> know where to go.
>
> thanks
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]


  #4  
Old July 19th, 2005, 11:40 AM
Chris Barber
Guest
 
Posts: n/a
Default Re: Global asa refresh

Suggestion:
Load the array from an XML file and then reload if array ceases to exist of
the UBound is 0.

or

Have a function in an include that loads the array and call function if
necessary to reload it.

Chris.

"K B" <nottelling@yahoo.com> wrote in message
news:%23C3twDz6DHA.2056@TK2MSFTNGP10.phx.gbl...


I have an application that loads an array in the global ASA file.
Sometimes that array gets lost for no real reason, resulting in a ubound
error. MS has a solution which involves removing virus-scanning and
backup procedures...which is not an option.

My question is simple...is there ANY way to force the Global.ASA to
relaod that array? Currently I have to go in and edit the global.asa,
add a few spaces and then backspace and save and it causes a reload.

I could easily check if the variable exists, but if it does not I do not
know where to go.

thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles