I added this code on my page to appear if a recordset is empty:

<% If rsArticles.EOF = False Then %>
                      Sorry, there are no listings for this classification today
  <% End If  %>

I tested the page and that phrase did not appear. There are no records in that field so it should work.

Code at the top:

<%
Dim rsArticles
Dim rsArticles_cmd
Dim rsArticles_numRows

Set rsArticles_cmd = Server.CreateObject ("ADODB.Command")
rsArticles_cmd.ActiveConnection = MM_Classifieds_STRING
rsArticles_cmd.CommandText = "SELECT * FROM Test WHERE CLASS_NUMBER = '44' ORDER BY START_DATE ASC" 
rsArticles_cmd.Prepared = true

Set rsArticles = rsArticles_cmd.Execute
rsArticles_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsArticles_numRows = rsArticles_numRows + Repeat1__numRows
%>

Any ideas what the problem could be?

If rsArticles.EOF = True

you dont need to put true or false
it can work this way as well

if(recordset.eof) then 'means recordset is empty

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.