Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does IIS6/VBScript have a max number of variables per script limit? 2

Status
Not open for further replies.

POSAPAY

IS-IT--Management
Jul 27, 2001
192
0
0
HU
I'm still using good old ASP with VBScript, and my application has grown so big, I get the error message:

Microsoft VBScript runtime error '800a0006'

Overflow: '[number: 32771]'

/default.asp, line 519

After a lot of testing, I've discovered this number is probably the number of variables I have used in the script.
The actual line number seems to be wrong, as occasionally the line it mentions in the error has no code in it.

I use extensive amount of other asp page inclusions.
Probably should use different methods in the future, but I probably will not rewrite this huge application any time soon, so I need to modify the maximum number for this somehow. Anyone know how that can be done? Registry?

By the way, when I remove a simple code such as:
Code:
<%=DateCreated%>
The number decreases by one.

Please correct me if I'm wrong...but I think it is counting the variables. I'm not using any integers that would exceed the integer maximum size, so I assume it is some built in thing.

Anybody else get this error? Any solutions? Ideas?
 
As I recall VBScript uses a signed INT to enumerate variables, which suggests that the maximum number of variables will be 32767. Sounds like you may need a code review if you are really using more than 32000 variables though!

If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Now, I called it variables, but that was just a guess.

Here is an example.. right now the error is:
Microsoft VBScript runtime error '800a0006'

Overflow: '[number: 32773]'

/default.asp, line 519

and after I remove these three lines of code:
Code:
<%if DateDue <> "" then%>
 <u><b>Due Date:</b></u><br><center><%=formatdatetime(DateDue,2)%></center><BR>
<%end if%></font>

and then run it, now the error is:
Microsoft VBScript runtime error '800a0006'

Overflow: '[number: 32770]'

/default.asp, line 519

so what is it enumerating here? Perhaps it is the lines that include asp executable lines?


...
As for changing the entire application from executing using a single root asp file that references other files depending on values in variables sent back to in in a QueryString of Form variables....
...well, I'd be rewriting a pretty big chunk to have each module be separated to have smaller sections on separate pages.

I really just wish that the enumerating variable's declaration could be changed from INT to a Long-INT.
-p
 
You seem to be jumping in and out of code - have you considered using Response.write which will abbreviate and simplify your code and (I believe) speed up execution

I also note that you are using <font> tags which suggests that you may be due for a code review as the font tag is deprecated -
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
If you are writing out a lot of things in the same format, maybe some sort of write subroutine you could call and reuse would be a code savings as well.
 
Thanks for the tips!
I guess I'll need to optimize, and restructure a bit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top