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

ID: Q174685


The information in this article applies to:


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/

Additional query words:


Keywords          : kbVBScript kbGrpASP 
Version           : WINDOWS:1.0,1.1,2.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 10, 1999