Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 5th, 2009, 04:20 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default errors with nested Do While Loops

I am trying to duplicate some one else's report with a web page. The report looks like an outline.
The way I have accomplished this it with a three deep nested Do While Loop and three recordsets here is the code;
If Recordset Then %>
    <tr><th>Part Used</th><th>Symptom Code</th><th>Symptom Description</th><th>Part Notes</th><th>Total</th></tr>
<% Do While Not rs1.EOF %>
    <tr><td><%=rs1("replacementPartNumber") %>&nbsp;</td><td><%=rs1("description") %>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td><%=rs1("total") %>&nbsp;</td></tr>
        Do While rs1("replacementPartNumber") = rs2("replacementPartNumber")%>
        <tr><td>&nbsp;</td><td><%=rs2("symptomCode") %>&nbsp;</td><td><%= rs2("sympDesc") %>&nbsp;</td><td>&nbsp;</td><td><%=rs2("test") %>&nbsp;</td></tr>
            Do While rs2("symptomCode") = rs("symptomCode")
            <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td><%=rs("test2") %>&nbsp;</td><td><%=rs("test") %>&nbsp;</td></tr>
    rs1.MoveFirst %>
Set rs = Nothing
Set rs1 = Nothing
Set rs2 = Nothing
End If
I tried to take out as much of the HTML style coding to make it easier to read.
My problem is that it runs and gives me the expected results except right above the table it displays an error message;

error '80020009'
/testdev/davie/davieworking/citizenPartUsageData.asp, line 71

line 71 is the inner most Do While statement.
If I remove the inner most Do While Loop the same error occurs at the "new" inner most loop.
Any help would be appreciated

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Loops in SQL Query values from table/set miamikk SQL Server 2000 1 August 31st, 2007 12:35 AM
break for-each loops, or limit amount of loops warhero XSLT 2 July 4th, 2007 02:18 AM
strange "errors" with nested master pages... thenoseknows ASP.NET 2.0 Professional 2 November 28th, 2006 05:28 PM
weird program flow with nested loops zayasv Intro Programming 2 November 17th, 2005 06:19 AM
problem with nested loops ptaylor2005 Beginning PHP 4 April 27th, 2005 07:05 PM

All times are GMT -4. The time now is 06:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.