Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Problem exiting loop


Message #1 by "Spencer Saunders" <ssaunders@i...> on Thu, 9 Aug 2001 18:56:15 -0400
I have an array of categories and I want to loop through my recordset 

and display the records in order of their categories.

SO I'm using a For...Next loop to get the categories out  of the array, 

and within that I have a DO WHILE loop that writes the article title to 

the page if it matches with that of the current array item. It all works 

except when the DB runs out of records - then I get an "exception 

occurred" error.



Code.





For i=0 to UBound(RSarray,2)

response.write"<font size=+3>"& RSarray(j,i) & "</font><br> " & i & 

"<br>"

Do While tablecheck("category")=RSarray(j,i)

if tablecheck.EOF then

tablecheck.movefirst

end if

if tablecheck("category") = RSarray(j,i) then

response.write tablecheck("title") & "-" & tablecheck("category") & 

"<br>"

tablecheck.movenext

end if

loop

Next



I'm getting the error on this line:

Do While tablecheck("category")=3DRSarray(j,i)





any help would be groovy.



spencer


  Return to Index