why does this loop forever?

Results 1 to 2 of 2

Thread: why does this loop forever?

  1. #1
    Join Date
    Dec 1969

    Default why does this loop forever?

    At this point in the script I am connected to a database and a text file, reading from the database, and writing to the txt until it times out. Makes a 50 mb text file in about a second. From the output it is not entering the "Do While" Loop. I hope one of you will see what I am missing!<BR><BR>Do Until EndLoop = True<BR> strCurrentName = objRS("Name")<BR> objOpenFile.WriteLine "write some stuff here" <BR> Do While strCurrentName = objRS("Name")<BR> Response.Write "inside loop<BR>"<BR> Response.Flush<BR> objRS.MoveNext<BR> If objRS.EOF Then<BR> EndLoop = True<BR> Exit Do<BR> End If<BR> Loop<BR>Loop

  2. #2
    Join Date
    Dec 1969

    Default Bill's mantra: DEBUG DEBUG DEBUG

    Yeah, you&#039;ve got some debug in there. Put in more.<BR><BR>Do Until EndLoop = True<BR>&nbsp; &nbsp; strCurrentName = objRS("Name")<BR>&nbsp; &nbsp; Response.Write "strCurrentName is " & strCurrentName & "&#060;P&#062;"<BR>&nbsp; &nbsp; Response.Write "strCurrentName=objRS(Name)? " & (strCurrentName=objRS("Name") & "&#060;P&#062;"<BR>&nbsp; &nbsp; Do While strCurrentName = objRS("Name")<BR>&nbsp; &nbsp; &nbsp; &nbsp; Response.Write "DEBUG: inside inner loop&#060;P&#062;"<BR>&nbsp; &nbsp; &nbsp; &nbsp; Response.End<BR>&nbsp; &nbsp; Loop<BR>&nbsp; &nbsp; Response.Write "DEBUG: after inner loop&#060;P&#062;"<BR>&nbsp; &nbsp; Response.End<BR>Loop<BR><BR>

Posting Permissions

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