Does field have the value or not

Results 1 to 2 of 2

Thread: Does field have the value or not

  1. #1
    J Guest

    Default Does field have the value or not

    I have the field named number1 in my database. I have to examine if this field is empty or if it is not empty.<BR><BR><BR>This works (if the field have the value) :<BR><BR>&#060;%if rs("number1") &#060;&#062; "" then%&#062;<BR><BR>But this does not work (if the field have not a value, the field number1 is empty):<BR><BR>&#060;%if rs("number1") = "" then%&#062;<BR><BR><BR>How I have to fix this line &#060;%if rs("number1") = "" then%&#062; that it works?<BR><BR>Every product has many numbers: number1, number2, number3 and so on<BR><BR><BR>Thank you

  2. #2
    Join Date
    Dec 1969

    Default RE: Does field have the value or not

    I suspect your trouble is because the db field has a null value, null is not the same as "", try this :<BR><BR><BR>&#060;%if rs("number1") & "" = "" then%&#062;<BR><BR>this will be true if the field is null OR if it is ""<BR><BR><BR>HTH<BR>MikeD

Posting Permissions

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