How to detect empty field

Results 1 to 2 of 2

Thread: How to detect empty field

  1. #1
    Victor Tai Guest

    Default How to detect empty field

    I want to take data from the database, how to detect if a specific field is empty. Say I have a recordset, I need to detect wheather "name" field is empty, following code din&#039t work:<BR><BR>IF recordset("name") = "" THEN<BR> RESPONSE.WRITE "NO NAME"<BR>ELSE<BR> RESPONSE.WRITE "HAVE NAME"<BR>END IF<BR><BR>The code always go to "Have Name"<BR>Any idea?<BR>Thanks<BR><BR>vic

  2. #2
    sm549 Guest

    Default RE: How to detect empty field

    There are different ways.<BR><BR>If Trim(recordset("name")) = ""<BR><BR>If "" & recordset("name") = ""<BR><BR>My fav is Trim.<BR><BR>HIH

Posting Permissions

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