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" <no********@yahoo.com> wrote in message
news:#C**************@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!