Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do/Until loops?

Status
Not open for further replies.

PogoWolf

Programmer
Mar 2, 2001
351
US
I have here a code snippet from my website..
I'm trying to build a drop down list from a database hit.

the issue is that this code sends the server into an never ending loop..

<% Do %>
<OPTION><%=RS.FIELDS(&quot;Handle&quot;)%></OPTION>
<% Loop Until RS.EOF = True %>

I know this type of a set up works in VB.. and thought
it would work in VBA.. I assume I'm messing something up in the loop clause.. but I can't see it..

Help? LOL =)
---===///The PogoWolf\\\===---
Darkness..Bleakness..Plastic forks..?

 
<% Do %>
<OPTION><%=RS.FIELDS(&quot;Handle&quot;)%></OPTION>
<% RS.MoveNext
Loop Until RS.EOF = True %>

You simply forgot to move the record pointer.

Wouldnt the following be easier to read?

<% Do
Response.Write(&quot;<OPTION>&quot; & RS.FIELDS(&quot;Handle&quot;)&&quot;</OPTION>&quot;)
Loop Until RS.EOF = True %> Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top