Whats with null database values.

Results 1 to 3 of 3

Thread: Whats with null database values.

  1. #1
    Grant Williamson Guest

    Default Whats with null database values.

    I&#039;m trying to do password authentication against a database, but I&#039;m making it so if the PASSWORD field for a given username in the database is empty, that user is able to log in without entering a password. Sounds simple? I&#039;m having problems.<BR><BR>The main problem is making ASP detect and accept that a null database field is empty.<BR><BR>rs("password") = ""<BR>doesn&#039;t work - it&#039;s false even when the database field IS empty.<BR><BR>rs("password") is null<BR>doesn&#039;t work - gives an "Object Required" error. how do I use this?<BR><BR>len(rs("password"))<BR>does VERY weird things; instead of returning 0, it returns nothing at all. Shouldn&#039;t it always return an integer? What&#039;s wrong here. On the other hand, trying to test len(rs("password"))="" doesn&#039;t work either.<BR><BR>I&#039;m using this on an Access database, the password field type is TEXT, on IIS5/Windows 2000.

  2. #2
    Join Date
    Dec 1969

    Default RE: Whats with null database values.

    use the isNull() function (? check the docs first)

  3. #3
    Grant Williamsonj Guest

    Default RE: Whats with null database values.

    Thank you! It worked like a charm :)

Posting Permissions

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