473,569 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global.asa -- Wazzat?

Hi Folks,

I need some help and a lot more knowlege. One will come eventually and maybe
you can provide the other.

Fairly well versed in ASP-VBScript, but new to using the Global.asa. Can I
define an Array in my Global.asa and make it available to my application?

Here's the deal. Each asp page needs access to an array of names to read
from, numbering between 10 and 19 per page. I have an Application(Poi nter)
that is incremented per the number of names read from the array so the next
page starts where the last left off. At present there are 129 names in the
array. More to come. The Application(Poi nter) is working and is incremented
properly in a test page. The Global.asa generates no errors. However any
attempt to access the Array() gives me an error.
............... ............... ............... ............... ......
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'AlphaArray'

/rev/work/metatest.asp, line 26

Can it be the "/rev/work/" causing this?
............... ............... ...........

Here is my Global.asa

//////////////////////
<script language="vbscr ipt" runat="server">
sub Application_OnS tart
DIM pointer, AlphaArray()
Application(poi nter)=1
filename=Server .MapPath("../docs/Alpha.txt")
Set fs=CreateObject ("Scripting.Fil eSystemObject")
Set aobj=fs.OpenTex tFile(filename, 1)
Do
a=aobj.readline
if a="#END" then exit Do
AlphaArray(i+1) =a
i=i+1
Loop
Application(Alp haArray())=Alph aArray()
AlphaArray=""
end sub

sub Application_OnE nd
Application(Alp haArray())="":A pplication(poin ter)=""
end sub
</script>
//////////////////////////

Here is the offending script in the test page
\\\\\\\\\\\\\\\ \\\\\\\\\\\
<%
pointer=Applica tion("pointer")
Response.Write( pointer)
If pointer > 129 then pointer=1
DIM wordval, term, Fetch, Hilimit
wordval=6
term=chr(34) & ">"
Fetch=20-wordval
Hilimit=pointer +Fetch
DO
Response.Write( Application(Met aArray(Pointer+ 1)) & term)
Pointer = Pointer+1
If Pointer=Hilimit then Exit DO
LOOP
%>
\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\
Jul 19 '05 #1
0 2367

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

Similar topics

8
102744
by: David Hitillambeau | last post by:
Hi guys, As I am new to Python, i was wondering how to declare and use global variables. Suppose i have the following structure in the same module (same file): def foo: <instructions> <instructions> def bar: <instructions>
1
2221
by: Andr? Roberge | last post by:
I have the following two files: #--testexec.py-- def exec_code(co): try: exec co except: print "error" #-- test.py--
7
2680
by: Lyn | last post by:
Hi and Season's Greetings to all. I have a question regarding the use of a qualifier word "Global". I cannot find any reference to this in Access help, nor in books or on the Internet. "Global" seems to be recognised by Access in at least three cases:- 1) "Global Const". Recently someone in this group helped me resolve a problem, and it...
33
3011
by: MLH | last post by:
I've read some posts indicating that having tons of GV's in an Access app is a bad idea. Personally, I love GVs and I use them (possibly abuse them) all the time for everything imaginable - have been for years. If the machine has memory to spare and windows can use it - I'm thinking "Why not?" I was wondering what some of you have to say...
9
8627
by: CDMAPoster | last post by:
About a year ago there was a thread about the use of global variables in A97: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157 Best Practices by Kang Su Gatlin, casual mention was made about using static variables as an alternative to using global variables. This caused me to think of the...
3
2759
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Defining_Functions doesn't actually give any insight.
8
13181
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to the production machine, I get this error: Parser Error Message: Could not load type 'Global'....
15
2538
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Just starting to move to ASP.NET 2.0 and having trouble with the Global.asax code file. In 1.1 I could have a code behind file for the global.asax file. This allow for shared variables of the Global class. Note: I use these shared variables for read only values that are set at application start. It would appear the 2.0 doesn't like you...
1
29323
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have called it polluting the global namespace. This article explores what happens when the global namespace becomes polluted and how to avoid this...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.