Error catching

Results 1 to 2 of 2

Thread: Error catching

  1. #1
    Join Date
    Dec 1969

    Default Error catching

    Hi,<BR>I have used ASP to display a list of records from my database by going through to EOF, cos the list depends on criteria specified by a user. At the moment though, if there are no records matching the criteria, it gives an error saying a record is required. This makes sense, but I don&#039;t know what to tell it so that it ignores it and just says "no records".

  2. #2
    Join Date
    Dec 1969

    Default RE: Error catching

    Do something like this:<BR><BR>... Open recordset<BR><BR>If rs.EOF Then<BR> Response.Write "Sorry, no data was found."<BR>Else<BR> Do While Not(rs.EOF)<BR> &#039; Do whatever with the data<BR> rs.MoveNext<BR> Loop<BR>End If

Posting Permissions

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