rh71
No Lifer
Have a form which displays all rows (about 800) from a table ("requests") and each row has a submit button of its own. Essentially an admin can go there and "approve" a row at a time with that submit button (row then disappears for next run). Within each row though, I am trying to do a couple drop-down columns containing additional information... this is where the nested loops are not quite working out.
http://img4.imageshack.us/img4/7576/test2jm.jpg
You can see the 1st row is the only one displaying the query results in the 2 drop-down columns. 2nd row and onward are showing the columns, but not the query results they're supposed to produce.
Essentially the structure of my ASP code is:
Now the -- options are visible in each which means it's just the nested loops which aren't working. What am I doing wrong? Why is it not doing the nested loops on subsequent runs of the main loop?
http://img4.imageshack.us/img4/7576/test2jm.jpg
You can see the 1st row is the only one displaying the query results in the 2 drop-down columns. 2nd row and onward are showing the columns, but not the query results they're supposed to produce.
Essentially the structure of my ASP code is:
Code:
set rs = connR.execute (select for all rows in request table)
set rs2 = connR.execute (select statement to get servers for drop down 1)
set rs3 = connR.execute (select statement to get servers for drop down 2)
<%while not rs.EOF%>
<form blah blah> <tr>
<td>
<%=rs("blahblah") %> (column 1 results)
</td>
<td>
more =rs("blah") etc. etc. for the other columns
</td>
<td>
<select name="notsvr" id="notsvr">
<option value="none">--</option>
<%while not rs2.EOF%>
<option value="<%=rs2("blah")%>"><%=rs2("blah")%></option>
<%rs2.moveNext
wend %>
</select>
</td>
<td>
<select name="recsvr" id="recsvr">
<option value="none">--</option>
<%while not rs3.EOF%>
<option value="<%=rs3("blah")%>"><%=rs3("blah")%></option>
<%rs3.moveNext
wend %>
</select>
</td>
<td>
"status" column with hard-coded options...
</td>
<td>
comment & submit button
</td>
</tr> </form>
<%rs.moveNext
wend %>
Now the -- options are visible in each which means it's just the nested loops which aren't working. What am I doing wrong? Why is it not doing the nested loops on subsequent runs of the main loop?
Last edited: