473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Global asa refresh

K B


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!
Jul 19 '05 #1
3 5078
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" <no********@yahoo.com> wrote in message
news:%2****************@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!

Jul 19 '05 #2
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!

Jul 19 '05 #3
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" <no********@yahoo.com> wrote in message
news:%2****************@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!
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bloodhound | last post by:
Hi, Problem with global.asa not firing 100% of the time. This error crops up several times throughout the day but if you wait a while and reload the page (could be 5 mins or an hour) it will...
4
by: Jim Douglas | last post by:
Ok, I'm must be an dummy, there are tons of examples which none of which I can get to work! I want to setup and refresh about (10) different cache items. Most examples show this type of work being...
1
by: Fabio Cavassini | last post by:
Hi, I have made a method in Global.asax called from Application_Start event that loads some cache data from database to Application scope objets. This is necessary because this is some data...
35
by: eyoung | last post by:
I call a function that takes the unit price and quantity ordered to create an amount...it looks something like this. function calculateCost() { quantity=document.RFO.quantity.value;...
2
by: barry | last post by:
Hi I keep username and password in Global.aspx static public string un = ""; static public string pw = ""; after a user logs in i update un and pw with the input values. but if i start...
12
by: a | last post by:
def fn(): for i in range(l) global count count= .... how do i declare count to be global if it is an array subsequently i should access or define count as an array error:
23
by: David Colliver | last post by:
Hi, using c#, 1.1 I know that we are not supposed to use global variables etc. in c# I am having a problem, but not sure how to resolve. I did have another post here, but may have over...
10
by: ma | last post by:
Hello, I want to create a global class. To do this I did the followings: 1- Create a class name test. It has a public variable named mystring. public class test { public string mystring =...
1
by: sap0321 | last post by:
This should be kindergarten stuff but for some reason I am having trouble with it. I do 99.9% web programming and this is the first windows app i've done in years - probably the first ever in C# ......
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.