PRB: VBScript Out Of Memory Error when ASP Contains 64 For/Next

Last reviewed: December 11, 1997
Article ID: Q174685
The information in this article applies to:
  • Microsoft Visual Basic, Scripting Edition, versions 1.0, 1.1, 2.0

SYMPTOMS

The following error occurs when previewing an Active Server Pages (ASP) page that contains 64 or more For/Next loops:

   Microsoft VBScript compilation error '800a03e9'
   Out of memory

NOTE: The loops do not have to be executed, for example, they can be within a case statement that is never executed.

CAUSE

This is caused by a bug in the VBScript.dll 2.0.

RESOLUTION

This problem has been fixed in the VBScript.dll 3.0 to be released with Internet Explorer 4.0 and Internet Information Server 4.0

MORE INFORMATION

Steps to Reproduce Behavior

  1. Copy the code below into an ASP page. Be sure to fill in the missing 62 For/Next loops.

  2. Preview the file in a browser. The Microsoft VBScript compilation error "'800a03e9' Out of Memory" appears.

  3. Open the file in an editor and remove or comment out one of the For/Next loops.

  4. Save and preview the file in a browser. No error appears.

The expected behavior is no limitation on the number of For/Next loops.

   <HTML>
   <BODY>

   <%
   For x = 1 To 1
   Response.Write "Hello1"
   Next
   %>
   <P>
   <%
   For x = 1 To 1
   Response.Write "Hello2"
   Next
   %>
        .
        .
   (removed next 62 For/Next loops to conserve space)
        .
        .
   <%
   For x = 1 To 1
    Response.Write "Hello65"
    Next
    %>
   <P>
   </BODY>
   </HTML>


REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/vinterdev/

Technology        : kbInetDev
Version           : WINDOWS:1.0,1.1,2.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.