Im at wits end here, been staring at this code for the last three hours. Basically i have a recordset that writes a table row <tr> and then checks another recordset to see if the current id in the first recordset is the same as the current id in the second recordset. If they are than another <tr> is written, if not it continues with the loop that was begun at the begging of the page. I know the problem is in the loop, but ill be damned if i can find the thing. Any help would be appreciated. The way it stands now is the first records from each loop are properly written, but i get a EOF or BOF error once they hace written. The page im working on is located at . the offending code is posted below.
The 'hello' is for debugging purposes.
Thanks
Micah A. Norman
<% do until rstask.eof %>
<tr name="<%=rstask("fldTask_id"
%>">
<td>
<%=rstask("fldTask_Hours"
%>
</td>
<td>
<%=rstask("fldTask_Date"
%>
</td>
<td>
<%=rstask("fldTask_Name"
%>
</td>
<td>
<%=rstask("fldTask_Description"
%>
</td>
</tr>
<%
dim i, x1, x2
i = 1
x1 = rstask.fields("fldTask_id"
do rstasksub.eof
x2 = rstasksub.fields("fldTask2_Prinum"
if x1 = x2 then
response.write("<tr>"
response.write("<td>"
response.write("hello"
response.write("</td>"
response.write("</tr>"
elseif rstasksub.eof then
i=0
exit do
end if
rstasksub.movenext
loop
%>
<%
rstask.movenext
loop
%>
The 'hello' is for debugging purposes.
Thanks
Micah A. Norman
<% do until rstask.eof %>
<tr name="<%=rstask("fldTask_id"
<td>
<%=rstask("fldTask_Hours"
</td>
<td>
<%=rstask("fldTask_Date"
</td>
<td>
<%=rstask("fldTask_Name"
</td>
<td>
<%=rstask("fldTask_Description"
</td>
</tr>
<%
dim i, x1, x2
i = 1
x1 = rstask.fields("fldTask_id"
do rstasksub.eof
x2 = rstasksub.fields("fldTask2_Prinum"
if x1 = x2 then
response.write("<tr>"
response.write("<td>"
response.write("hello"
response.write("</td>"
response.write("</tr>"
elseif rstasksub.eof then
i=0
exit do
end if
rstasksub.movenext
loop
%>
<%
rstask.movenext
loop
%>