No Records Returned, Need to Say It

Results 1 to 2 of 2

Thread: No Records Returned, Need to Say It

  1. #1
    Join Date
    Dec 1969
    Posts
    87

    Default No Records Returned, Need to Say It

    How do I have a custom page come up when no records are returned from a SQL search? I just want a simple no results found try again to come up. Thanks for your help.<BR><BR>Dawn

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: No Records Returned, Need to Say It

    Whenever you&#039ve reached the end of a recordset, the EOF property is set to True. If, without navigating through the recordset at all, EOF is true, then the recordset must be empty. So, to test if a recordset is initially empty, just test if the EOF property is true.<BR><BR>If objRS.EOF = True then<BR>Response.Write "No results"<BR>Else<BR>Response.Write "Results!"<BR>&#039Display results<BR>End If<BR><BR>Happy Programming!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •