Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Fatal Loop!!!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Fatal Loop!!!

 Post Reply Post Reply
Author
White Fyre View Drop Down
Newbie
Newbie


Joined: 09 October 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote White Fyre Quote  Post ReplyReply Direct Link To This Post Topic: Fatal Loop!!!
    Posted: 09 October 2003 at 12:56pm

Help!

I can't figure out why this code is looping and crashing me!!

I was told that it is looking to "MoveNExt" after it reached the EOF. But I don't see how.

It goes into a fatal loop when it hits the "if/then/else" statement WITHIN the "While NOT Recordset1.EOF" statement.

Oh...my top 4 llines of code in the file are:

<% @Language VBScript %>

<% Option Explicit

Response.Buffer = True

%>

        Please help!!???

<%
WHILE NOT Recordset1.EOF
 %>
  <tr>
  <td width="20%" height="17"></td><%
 
 if ChiSpu = 1 then %>
 
  <td align="center" width="26%" Hieght="17">sometext</td>
  <td align="center" width="26%" Hieght="17"></td>
  <td align="center" width="26%" Hieght="17">sometext</td><%
 
 Else %>
 
  <td align="right" width="26%" eight="17"><%=(recordset1.fields.item("Name").value)%& gt;</td>
      <td width="1%" height="17"></td><%Recordset1.movenext%>
      <td align="center" width="5%" height="17" nowrap>Some Text</td>
      <td width="1%" height="17"></td><%
 
  If Recordset1.EOF = True then
 
   ChiSpu = ChiSpu + 1
 
  Else
 
   ChiSpu = ChiSpu + 1 %>
      <td width="31%" h eight="17"><%=(recordset1.fields.item("Name").value)%& gt;</td>
   <td width="20%" height="17"></td><%

   If Recordset1.EOF = True then

   Else
    Recordset1.movenext
   End if
  End If
 End if 
 Response.Flush
Wend
%>

 

What is the problem???

Back to Top
Coco Brown View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2002
Location: United States
Status: Offline
Points: 245
Post Options Post Options   Thanks (0) Thanks(0)   Quote Coco Brown Quote  Post ReplyReply Direct Link To This Post Posted: 09 October 2003 at 1:34pm

Try using...

Do While (Recordset1.EOF = false)

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 09 October 2003 at 3:26pm

your missing a loop

put:

Loop

Before wend

Back to Top
White Fyre View Drop Down
Newbie
Newbie


Joined: 09 October 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote White Fyre Quote  Post ReplyReply Direct Link To This Post Posted: 09 October 2003 at 9:45pm

Update...

The cause of the Fatal Loop is the first "If/then/else" statement.

Why would that cause a fatal loop????

Back to Top
vshriniwasan View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2001
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote vshriniwasan Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2003 at 1:45pm
<table>
<% Do Until Recordset1.EOF %>
 <tr><td align="right" width="26%" eight="17"><%=(recordset1("Name")) %></td></tr>
<% Recordset1.movenext
loop %>
</table>
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.