Error while including a new include file in ASP

S

Sarath

I am working with an application using ASP, getting below error when i am
trying to include new asp include file.
_____________________________________________________________________
Microsoft VBScript runtime error '800a0006'
Overflow: '[number: 33994]'
____________________________________________________________________

I am sure that there is no error in the new asp file as if i delete any
existing include file then no issues.

This is dynamic include and currently we are loading around 800 include files.

Is there any maximum limit for number of include files limitation in ASP?

Thanks in advance.

Sarath kumar
 
B

Bob Barrows [MVP]

Sarath said:
I am working with an application using ASP, getting below error when
i am trying to include new asp include file.
_____________________________________________________________________
Microsoft VBScript runtime error '800a0006'
Overflow: '[number: 33994]'
____________________________________________________________________

I am sure that there is no error in the new asp file as if i delete
any existing include file then no issues.

This is dynamic include and currently we are loading around 800
include files.

Is there any maximum limit for number of include files limitation in
ASP?
No, the problem is more likely an attempt in your include file to use an
Integer when you should be using a Long. Go through the code, especially
where any multiplication or addition occurs, and explicitly cast the
variables involved in the calculations as Longs using the CLng function.

Remember, the result of the addition or multiplication of two Integers is
required to be an Integer (max 32678). If the result of the operation is
greater than 32678, you get an overflow. For example:
dim x, y, z
x=2
y=16997
'these are stored as Integer by default
on error resume next
response.write "Without CLng():<BR>"
z=x*y
if err<>0 then
response.write err.description
err.clear
else
response.write z
end if
response.write "<BR>Using CLng():<BR>"
z=clng(x) * clng(y)
if err<>0 then
response.write err.description
err.clear
else
response.write z
end if

In order to guarantee that vbscript reserves enough space for the result of
the calculation, you need to cast the operands as Longs before performing
the operation. This forces vbscript to reserve space in memory for a Long
value instead of an Integer.

HTH,
Bob Barrows
 
R

Roland Hall

in message
:I am working with an application using ASP, getting below error when i am
: trying to include new asp include file.
: _____________________________________________________________________
: Microsoft VBScript runtime error '800a0006'
: Overflow: '[number: 33994]'
: ____________________________________________________________________
:
: I am sure that there is no error in the new asp file as if i delete any
: existing include file then no issues.
:
: This is dynamic include and currently we are loading around 800 include
files.
:
: Is there any maximum limit for number of include files limitation in ASP?

Did it report a line number? See if this helps:

http://support.jodohost.com/showthread.php?t=1694

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
S

Sarath

Thanks for quick response.
I am sure that there is no error in the new asp file as if i delete
any existing include file then no issues.

More over there are no arithmetic operations in the include files.

Thanks,
Sarath

Bob Barrows said:
Sarath said:
I am working with an application using ASP, getting below error when
i am trying to include new asp include file.
_____________________________________________________________________
Microsoft VBScript runtime error '800a0006'
Overflow: '[number: 33994]'
____________________________________________________________________

I am sure that there is no error in the new asp file as if i delete
any existing include file then no issues.

This is dynamic include and currently we are loading around 800
include files.

Is there any maximum limit for number of include files limitation in
ASP?
No, the problem is more likely an attempt in your include file to use an
Integer when you should be using a Long. Go through the code, especially
where any multiplication or addition occurs, and explicitly cast the
variables involved in the calculations as Longs using the CLng function.

Remember, the result of the addition or multiplication of two Integers is
required to be an Integer (max 32678). If the result of the operation is
greater than 32678, you get an overflow. For example:
dim x, y, z
x=2
y=16997
'these are stored as Integer by default
on error resume next
response.write "Without CLng():<BR>"
z=x*y
if err<>0 then
response.write err.description
err.clear
else
response.write z
end if
response.write "<BR>Using CLng():<BR>"
z=clng(x) * clng(y)
if err<>0 then
response.write err.description
err.clear
else
response.write z
end if

In order to guarantee that vbscript reserves enough space for the result of
the calculation, you need to cast the operands as Longs before performing
the operation. This forces vbscript to reserve space in memory for a Long
value instead of an Integer.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
R

Roland Hall

in message
: Remember, the result of the addition or multiplication of two Integers is
: required to be an Integer (max 32678).

I thought a 16-bit integer signed value was between the range of -32768 and
+32767, unsigned 0-65535.
Jes' sayin'... (O:=

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
B

Bob Barrows [MVP]

Did I say 32678 ...? My bad.

Roland said:
in message


I thought a 16-bit integer signed value was between the range of
-32768 and +32767, unsigned 0-65535.
Jes' sayin'... (O:=

--
Roland Hall
/* This information is distributed in the hope that it will be
useful, but without any warranty; without even the implied warranty
of merchantability or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library -
http://msdn.microsoft.com/library/default.asp
 
B

Bob Barrows [MVP]

Yes, you already said erasing all the include files allows the new asp page
to run without error. That only means that there is no error in the new asp
file. That does not mean that the data from the new asp file is not causing
an overflow in one of the include files that is using its data.

You need to do some intensive debugging: First, find out which include file
causes the error. This means commenting out all calls to procedures in the
include files in the new asp file (allowing you to add all the include files
and run the new asp file without error). Then, uncomment the calls to the
included procedures until you find the one that causes the error.

Unfortunately, there are no shortcuts.

Bob Barrows
Sarath said:
Thanks for quick response.
I am sure that there is no error in the new asp file as if i delete
any existing include file then no issues.

More over there are no arithmetic operations in the include files.

Thanks,
Sarath

Bob Barrows said:
Sarath said:
I am working with an application using ASP, getting below error when
i am trying to include new asp include file.
_____________________________________________________________________
Microsoft VBScript runtime error '800a0006'
Overflow: '[number: 33994]'
____________________________________________________________________

I am sure that there is no error in the new asp file as if i delete
any existing include file then no issues.
 
R

Roland Hall

in message
:I don't think vbscript can supply an unsigned 16-bit integer ...

I have no need for one anyway. (O:=

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
R

Roland Hall

in message
: Did I say 32678 ...? My bad.

Don't worry about it. I read it as 32768 and didn't realize it until now.
I guess I was transposing. <plug>I spent an extra hour this morning working
out a solution for FF because it's easier than IE which was already
working.</plug> I also found what appears to be another 'standards' oops
but don't say anything.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top