D
D. Shane Fowlkes
When using classic ASP, I would use something like what's below to show HTML
if the recordset was empty.
<% If RS.EOF And RS.BOF Then %>
<p>There are no records to display.</p>
<% End If %>
Now...as I'm learning ASP.NET, I'll use something like what's below to loop
thru a recordset.
<%
While MyData.Read()
Response.Write...stuff.....
End While
%>
But as simple as it may seem, I cannot find any references in my books or
online how to "detect" if the recordset is empty. I'm basing my SELECT
statement off of a search form so if the user types something that's not
useful like "tuvwxyz", the query will most likely return nothing. Any
pointers?
Thanks
--
*********************************
D. Shane Fowlkes - TMM
Saving the world, one web site at a time.
http://www.shanefowlkes.com
*********************************
if the recordset was empty.
<% If RS.EOF And RS.BOF Then %>
<p>There are no records to display.</p>
<% End If %>
Now...as I'm learning ASP.NET, I'll use something like what's below to loop
thru a recordset.
<%
While MyData.Read()
Response.Write...stuff.....
End While
%>
But as simple as it may seem, I cannot find any references in my books or
online how to "detect" if the recordset is empty. I'm basing my SELECT
statement off of a search form so if the user types something that's not
useful like "tuvwxyz", the query will most likely return nothing. Any
pointers?
Thanks
--
*********************************
D. Shane Fowlkes - TMM
Saving the world, one web site at a time.
http://www.shanefowlkes.com
*********************************