A Do While... Loop in a Do While... Loop...

Thread: A Do While... Loop in a Do While... Loop...

1. Senior Member
Join Date
Dec 1969
Posts
115

A Do While... Loop in a Do While... Loop...

How do you write a Do While... Loop in a Do While... Loop?

2. Senior Member
Join Date
Dec 1969
Posts
16,931

RE: A Do While... Loop in a Do While... Loop...

Do while myVar &#060; 1<BR> Do while myVar2 &#062; 2<BR> myVar2 = myVar2 - 1<BR> loop<BR> myVar = myVar + 1<BR>loop<BR><BR>But do you REALLY need two do while loops? It&#039;s MUCH better practise to have a For...Next loop, or set of them. Solely because you can&#039;t create a never-ending For...Next loop.<BR><BR>Craig.

3. Senior Member
Join Date
Dec 1969
Posts
598

RE: A Do While... Loop in a Do While... Loop...

Do While rs.MoveNext()<BR>... <BR>Loop

4. Senior Member
Join Date
Dec 1969
Posts
134

RE: A Do While... Loop in a Do While... Loop...

Neverending For loop...<BR><BR>Dim x = 3<BR><BR>For i = 1 to x<BR>x = x + 1<BR>Next<BR><BR>Would this ever finish?

5. Senior Member
Join Date
Dec 1969
Posts
134

RE: A Do While... Loop in a Do While... Loop...

I don&#039;t think you could do this because MoveNext is a method rather than a property.<BR><BR>You might want to use the following to create a datagrid<BR><BR>Do While rs.EOF<BR>i = 1<BR>Do While i &#060; rs.Fields(i).count<BR>Response.Write i<BR>Loop<BR>rs.MoveNext<BR>Loop

Posting Permissions

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