ASP Recordset

Results 1 to 2 of 2

Thread: ASP Recordset

  1. #1
    Join Date
    Dec 1969

    Default ASP Recordset

    Hi,<BR>I would like to know the syntax to check whether a Recordset is NULL or not?..Am pasting a section of my code:<BR><BR>sql1 = "SELECT * FROM TimeTableFall where Begins=&#039;"&time1&"&#039; AND (Day LIKE &#039;"&day1&"%&#039; OR Day Like &#039;%"&day1&"&#039; OR Day Like &#039;%"&day1&"%&#039;) "<BR> <BR>Set Recordset2 = Connection3.Execute(sql1) <BR><BR>If the query does not bring the proper results I would like to redirect to a different page for which I need to know whether the Recordset2 is null or not!!<BR><BR>Thanks in advance,<BR>Arjun<BR>

  2. #2
    Join Date
    Dec 1969

    Default If RS.EOF Then...

    ...<BR>Set Recordset2 = Connection3.Execute(sql1) <BR>If Recordset2.EOF Then Response.Redirect "noRecordsFound.asp"<BR>...<BR><BR>EOF means "End Of File" which is kind of a silly probably should have been "EOR" for "End Of Records"...but it has long historic roots.<BR><BR>

Posting Permissions

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