Empty Record Sets

Results 1 to 3 of 3

Thread: Empty Record Sets

  1. #1
    Kentium Guest

    Default Empty Record Sets

    I want to use objRec("catagory") to put a Catagory title in my page.<BR><BR>The problem is- if objRec("catagory") has no records, then I get an error- "Either EOF or BOF is true..yadda yadda"<BR><BR>I tried to set a var = to objRec("catagory") and then test the var for empty- if var = "" then catagory = whatever...<BR><BR>This gave me the same problem whenever objREc("catagory") contains no records.<BR><BR>Is there anyway to test if a RS is empty without it erroring out?<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Empty Record Sets

    You can check to see if the entire recordset contains any data or is at the EOF by doing this.<BR><BR>If NOT objRec.EOF Then<BR> strCat = objRec("catagory")<BR>End If

  3. #3
    Kentium Guest

    Default That works..thanks.


Posting Permissions

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