Kan man inte köra två "Do until" i en loop?
I den här koden så körs inte "Do Until co.EOF" andra gången!
<%
SqlCo="Select * From Countries Where Belongs=''"
Set cou=Conn.Execute(SqlCo)
Do Until cou.EOF
coSQL= "Select * From Countries Where Belongs="& cou("CountryID")
Set co=Conn.Execute(coSQL)
%>
<td width="25"><input type="radio" value="<%=cou("CountryID")%>" name="countrie"
<%
Do Until co.EOF
If CInt(user("CountryBel"))=co("CountryID") then
%>
checked
<%
End If
co.MoveNext
Loop
%>></td>
<td width="263"><select name="CountryBel" size="1">
<% Do Until co.EOF %>
<option value="<%=co("CountryID")%>"<% If CInt(user("CountryBel"))=co("CountryID") then %> selected<% End If %>><%=co("CouName")%></option>
<%
co.MoveNext
Loop
co.Close
Set co=Nothing
%>
</select></td>
<%
cou.MoveNext
Loop
cou.Close
Set cou=Nothing
%>
Jag har tagit bort massor av HTML som vanligt för att ni lättare ska kunna läsa ut allt
<%
SqlCo="Select * From Countries Where Belongs=''"
Set cou=Conn.Execute(SqlCo)
Do Until cou.EOF
coSQL= "Select * From Countries Where Belongs="& cou("CountryID")
Set co=Conn.Execute(coSQL)
Do Until co.EOF
If CInt(user("CountryBel"))=co("CountryID") then
koll=" checked"
koll2=" selected"
End If
selec="<option value="& co("CountryID") &""& koll2 &">"& co("CouName") &"</option>"
co.MoveNext
Loop
%>
<td width="25"><input type="radio" value="<%=cou("CountryID")%>" name="countrie"<%=koll%>></td>
<td width="263"><select name="CountryBel" size="1">
<%=selec%>
</select></td>
<%
co.Close
Set co=Nothing
cou.MoveNext
Loop
cou.Close
Set cou=Nothing
%>
Du kan inte köra två until co.eof på en gång, utan att köra en movefirst emellan.
Jag ser inte riktigt vad det åär du försöker göra, men om du verkligen vill loopa igenom samma sak flera gånger kan jag rekommendera att du gör en array med getrows.