Link to home
Start Free TrialLog in
Avatar of erin027
erin027Flag for United States of America

asked on

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 %>
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

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

Avatar of erin027

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial