Error while including a new include file in ASP

Discussion in 'ASP General' started by Sarath, Jul 18, 2005.

  1. Sarath

    Sarath Guest

    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
     
    Sarath, Jul 18, 2005
    #1
    1. Advertising

  2. 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"
     
    Bob Barrows [MVP], Jul 18, 2005
    #2
    1. Advertising

  3. Sarath

    Roland Hall Guest

    "Sarath" wrote in message
    news:...
    :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
     
    Roland Hall, Jul 18, 2005
    #3
  4. Sarath

    Sarath Guest

    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"
    >
    >
    >
     
    Sarath, Jul 18, 2005
    #4
  5. Sarath

    Roland Hall Guest

    "Bob Barrows [MVP]" wrote in message
    news:%...
    : 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
     
    Roland Hall, Jul 18, 2005
    #5
  6. Did I say 32678 ...? My bad.

    Roland Hall wrote:
    > "Bob Barrows [MVP]" wrote in message
    > news:%...
    >> 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.
     
    Bob Barrows [MVP], Jul 18, 2005
    #6
  7. I don't think vbscript can supply an unsigned 16-bit integer ...

    Roland Hall wrote:
    > "Bob Barrows [MVP]" wrote in message
    > news:%...
    >> 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.
     
    Bob Barrows [MVP], Jul 18, 2005
    #7
  8. 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.
     
    Bob Barrows [MVP], Jul 18, 2005
    #8
  9. Sarath

    Roland Hall Guest

    "Bob Barrows [MVP]" wrote in message
    news:...
    :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
     
    Roland Hall, Jul 18, 2005
    #9
  10. Sarath

    Roland Hall Guest

    "Bob Barrows [MVP]" wrote in message
    news:...
    : 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
     
    Roland Hall, Jul 18, 2005
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kpoan
    Replies:
    0
    Views:
    414
    kpoan
    Aug 15, 2006
  2. naveeddil
    Replies:
    0
    Views:
    631
    naveeddil
    Jan 4, 2008
  3. Andreas Bogenberger
    Replies:
    3
    Views:
    1,010
    Andreas Bogenberger
    Feb 22, 2008
  4. Eric
    Replies:
    10
    Views:
    503
  5. Eric
    Replies:
    0
    Views:
    280
Loading...

Share This Page