Repeat loop after EOF

265 views Asked by At

It is posible to repeat loop again throught recordset after first loop?

<%
Response.Writ5 "First Loop"
do while not rs.EOF 
     Response.Write "<option>" & rs.Fields(0) & "</option>" & vbCrLf
   rs.MoveNext 
loop

'repeat
Response.Write "Second Loop"
do while not rs.EOF 
     Response.Write "<option>" & rs.Fields(0) & "</option>" & vbCrLf
   rs.MoveNext 
loop

%>
1

There are 1 answers

0
Richard On BEST ANSWER

Quick answer: No.

Record sets are forward only collections, there is no "SeekToStart" operation.

if you need to pass over the data twice copy it into a local array, if the quantity of data is too much for that, then you probably need to rethink your approach.