Could someone explain this

# Thread: Could someone explain this

1. Senior Member
Join Date
Dec 1969
Posts
134

## Could someone explain this

I have never used this before and not sure how to, I think I need it for may task, but could someone please break it up and tell me what it does and how to use it.<BR>Any help would be great. <BR><BR>i = 1<BR>&#039; goto the third record<BR>Do While (i &#060; 3 And Not rs.EOF)<BR>rs.MoveNext()<BR>i = i + 1<BR>Loop<BR>&#039; write the third record if there is one<BR>If Not rs.EOF Then<BR>response.write rs.fields("name").value<BR>End If<BR>

2. Al Bear Guest

## RE: Could someone explain this

Well I am not 100% sure what you are trying to do. <BR><BR>but at the moment you have an infenate loop. as i will never = more than 1. try <BR><BR>i = 1<BR>&#039; goto the third record<BR>Do While (i &#060; 3 And Not rs.EOF)<BR>i = i + 1<BR>rs.MoveNext<BR><BR>Loop<BR>&#039; write the third record if there is one<BR>If Not rs.EOF Then<BR>response.write rs.fields("name").value<BR>End If<BR><BR>if you are still having problems come back..

3. sam
Senior Member
Join Date
Dec 1969
Posts
866

## RE: Could someone explain this

i = 1 <BR>&#039; goto the third record <BR>Do While (i &#060;= 3 And Not rs.EOF) <BR>rs.MoveNext() <BR>if i = 3 then<BR>response.write rs.fields("name").value<BR>exit do<BR>end if<BR>i = i + 1 <BR>Loop <BR>

4. Chaveiro Guest

## RE: Could someone explain this

instead, why dont you try:<BR>Rs.AbsolutePosition = 3<BR><BR>but remember... you have to open the Recordset like this:<BR>Rs.OPEN SQL,Conection,1,4<BR>&#039;I fotgot what 1 and 4 means... but it&#039;s works...

5. Senior Member
Join Date
Dec 1969
Posts
1,203

## um

How will this code:<BR>i = 1 <BR>&#039; goto the third record <BR>Do While (i &#060; 3 And Not rs.EOF) <BR>rs.MoveNext() <BR>i = i + 1 <BR>Loop<BR>-----<BR>go into an infinite loop? i = i + 1 in each iteration, therefore, i !&#060; 3 after the second iteration.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•