Knowledge Base

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

Article ID: 174685

Article Last Modified on 12/1/2003


APPLIES TO


This article was previously published under Q174685

SYMPTOMS

The following error occurs when you preview 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, which is 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. You receive the Microsoft VBScript compilation error "'800a03e9' Out of Memory".
  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>
				

Keywords: kberrmsg kbscript kbprb KB174685