473,405 Members | 2,354 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,405 software developers and data experts.

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(Pointer)
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(Pointer) 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="vbscript" runat="server">
sub Application_OnStart
DIM pointer, AlphaArray()
Application(pointer)=1
filename=Server.MapPath("../docs/Alpha.txt")
Set fs=CreateObject("Scripting.FileSystemObject")
Set aobj=fs.OpenTextFile(filename,1)
Do
a=aobj.readline
if a="#END" then exit Do
AlphaArray(i+1)=a
i=i+1
Loop
Application(AlphaArray())=AlphaArray()
AlphaArray=""
end sub

sub Application_OnEnd
Application(AlphaArray())="":Application(pointer)= ""
end sub
</script>
//////////////////////////

Here is the offending script in the test page
\\\\\\\\\\\\\\\\\\\\\\\\\\
<%
pointer=Application("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(MetaArray(Pointer+1)) & term)
Pointer = Pointer+1
If Pointer=Hilimit then Exit DO
LOOP
%>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Jul 19 '05 #1
0 2359

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

Similar topics

8
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>...
1
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
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"...
33
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...
9
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...
3
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? ...
8
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...
15
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.