Microsoft KB Archive/174685
Article ID: 174685
Article Last Modified on 12/1/2003
- Microsoft Active Server Pages 4.0
- Microsoft Visual Basic, Scripting Edition 1.0
- Microsoft Visual Basic, Scripting Edition 1.1
- Microsoft Visual Basic, Scripting Edition 2.0
This article was previously published under Q174685
The following error occurs when you preview an Active Server Pages (ASP) page that contains 64 or more For/Next loops:
NOTE: The loops do not have to be executed, for example, they can be within a case statement that is never executed.
This is caused by a bug in the VBScript.dll 2.0.
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
Steps to Reproduce Behavior
- Copy the code below into an ASP page. Be sure to fill in the missing 62 For/Next loops.
- Preview the file in a browser. You receive the Microsoft VBScript compilation error "'800a03e9' Out of Memory".
- Open the file in an editor and remove or comment out one of the For/Next loops.
- 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