In Classic ASP, How do I convert "Next" query to "Do Until...Loop" query?

I have a query that uses "Next" query. What if I want to use Do Until....Loop query, How do I convert this query to that?
Thank you.

+++++++++++++++++My coding+++++++++++++++++++++++++++++++++++++++++++
<%
Dim itemcount
Itemcount=rs.pagesize

For 1 to Itemcount
%>

<Table>
<tr>
 <td><%=rs("name")%></td>
</tr>
<Table>

<% rs.MoveNext
Next %>
erin027Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
here we go, using the rs.eof property:
<% 
while not rs.eof
%> 
<Table>
<tr>
 <td><%=rs("name")%></td>
</tr>
<Table> 
<%  
  rs.MoveNext
wend
%>

Open in new window

0
erin027Author Commented:
Thanks angellll.
But I need the data from 1 to Itemcount only.
I am trying to display the certain data on each page.
Instead of rs.EOF is there anyway that I can bring data that is from 1 to itemcount?
itemcount is rs.pagesize.

I have rest of the coding but it's too much to post it up. I just need if I can use Do Until...loop query in this situation.
Thank you.
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
why do you want to change from the FOR .. to a WHILE loop actually?

anyhow:
<%
Dim itemcount
Dim l
Itemcount=rs.pagesize
l = 1
 
while l < Itemcount
%>
 
<Table>
<tr>
 <td><%=rs("name")%></td>
</tr>
<Table>
 
<% 
  rs.MoveNext
  l = l + 1
wend %>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.