By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,141 Members | 1,232 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,141 IT Pros & Developers. It's quick & easy.

Error while including a new include file in ASP

P: n/a
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

Jul 22 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Sarath wrote:
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"
Jul 22 '05 #2

P: n/a
"Sarath" wrote in message
news:66**********************************@microsof t.com...
: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
Jul 22 '05 #3

P: n/a
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 [MVP]" wrote:
Sarath wrote:
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"

Jul 22 '05 #4

P: n/a
"Bob Barrows [MVP]" wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
: 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
Jul 22 '05 #5

P: n/a
Did I say 32678 ...? My bad.

Roland Hall wrote:
"Bob Barrows [MVP]" wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #6

P: n/a
I don't think vbscript can supply an unsigned 16-bit integer ...

Roland Hall wrote:
"Bob Barrows [MVP]" wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #7

P: n/a
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 wrote:
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 [MVP]" wrote:
Sarath wrote:
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.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #8

P: n/a
"Bob Barrows [MVP]" wrote in message
news:ue**************@TK2MSFTNGP09.phx.gbl...
: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
Jul 22 '05 #9

P: n/a
"Bob Barrows [MVP]" wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl...
: 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
Jul 22 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.