[thelist] RS.eof and RS.bof (ASP)

Jay Blanchard jay.blanchard at niicommunications.com
Fri Mar 22 09:40:00 CST 2002


<snip>
I have query that returns one recordset.  In the event that no recordsets
are returned I wish to hide the code that would try to read from the
recordset (so it does not break the page).

Here is the code

<% if not rs.BOF and rs.EOF then %>

<td>Name:<td><%=rs("name")%>

<% end if  %>
</snip>
Try
<%
if NOT (rs.BOF AND  NOT rs.EOF)then {

	do FOO
	}
end if
%>

Jay




More information about the thelist mailing list