Are you positive a recordset is returned? Do you actually see outputs of something like:
<tr> <td></td> <td><a href="http://"></a></td> </tr> in your html code? Because your sql statement would effectively be: Select Comp, Web From tblComp Where SA = 'Y' and if there is not such column SA, then you shold get an error right away. What database are you using? Also, if you have On Error Resume Next, remove that, see if you get back an error message right away. -alex --- GLSmyth <[EMAIL PROTECTED]> wrote: Dan - A code example follows: strSQL = "Select Comp, Web From tblComp Where SA" & SACCNum & " = 'Y'" objCommand.CommandText = strSQL Set objRec = objCommand.Execute While Not objRec.EOF %> <tr> <td><%=objRec("Comp")%></td> <td><a href="http://<%=objRec("Web")%>"><%=objRec("Web")%></a></td> </tr> <% objRec.MoveNext Wend As per querystring value, the information would be selected from the SA1 or SA2 or SA3 column. When there is no querystring value, it apparently is looking for the SA column, which does not exist, and ends up (also, apparently) looping until all of the memory has been consumed. My question is "why is a recordset being returned" and "why is it looping?" Cheers - george --- In [email protected], "Dan Powderhill" <[EMAIL PROTECTED]> wrote: > Can you show us the code that creates the recordset and then loops? > > Dan > > -----Original Message----- > From: GLSmyth [mailto:[EMAIL PROTECTED] > Sent: 05 April 2005 13:48 > To: [email protected] > Subject: [ASP] Apparent Looping Problerm > > > > I have come across a problem and wonder if anyone can explain why this > might be happening. > > One of my programs uses the value of a query string to determine which > column within a table to obtain its information. What I have come to > learn is that some spiders are accessing the page and not offering a > value in the query string (makes sense). Because of this, the SQL is > trying to get information from a column that does not exist. > > Following the execution of the statement was the standard looping > through the records (yes, I know there is a better way, but it was an > old program). > > What happened was that apparently the code thought that a recordset had > been returned (I would not have thought that that would happen) and it > looped endlessly until it has consumed all memory and the server > crashed. > > I am not understanding why 1.) the code would think that a recordset was > returned, and 2.) why it would continually loop. > > If anyone has any ideas on this then I would greatly appreciate the > education. > > Cheers - > > george __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
