D
Dave
If so, what is wrong with this code in APS 3.0?
I open a recordset with order info. Each record contains the order header
info plus a line item from the order detail. So the recordset looks
something like this:
Orderid PartID
1 12
1 87
2 99
2 33
The web page should display as:
Order 1
Part 12
Part 87
Order 2
Part 99
Part 33
I though I could do this with the following code:
<%
Do while not rs.eof
%>
<tr>
<td>
<%Response.Write (rs.Fields("orderidid") & ".")%>
</td>
</tr>
<%
id=rs.Fields("orderid")
Do while rs.Fields("orderid")=id ' line 119
%>
<tr>
<td>
<%Response.Write (rs.Fields("partid")) %>
</td>
</tr>
<%
rs.movenext
Loop
rs.movenext
Loop
But I get this error:
Error Type:
(0x80020009)
Exception occurred.
/orders/orders.asp, line 119
Line 119 is the second Do Loop
The outer do loop works fine but when I add the inner loop it errors
Can I nest Do Loops in ASP 3.0?
What am I doing wrong here?
I open a recordset with order info. Each record contains the order header
info plus a line item from the order detail. So the recordset looks
something like this:
Orderid PartID
1 12
1 87
2 99
2 33
The web page should display as:
Order 1
Part 12
Part 87
Order 2
Part 99
Part 33
I though I could do this with the following code:
<%
Do while not rs.eof
%>
<tr>
<td>
<%Response.Write (rs.Fields("orderidid") & ".")%>
</td>
</tr>
<%
id=rs.Fields("orderid")
Do while rs.Fields("orderid")=id ' line 119
%>
<tr>
<td>
<%Response.Write (rs.Fields("partid")) %>
</td>
</tr>
<%
rs.movenext
Loop
rs.movenext
Loop
But I get this error:
Error Type:
(0x80020009)
Exception occurred.
/orders/orders.asp, line 119
Line 119 is the second Do Loop
The outer do loop works fine but when I add the inner loop it errors
Can I nest Do Loops in ASP 3.0?
What am I doing wrong here?