Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - IsNull  IsDriving me nuts
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

IsNull IsDriving me nuts

 Post Reply Post Reply
Author
ctscott View Drop Down
Senior Member
Senior Member


Joined: 27 May 2003
Location: United States
Status: Offline
Points: 246
Post Options Post Options   Thanks (0) Thanks(0)   Quote ctscott Quote  Post ReplyReply Direct Link To This Post Topic: IsNull IsDriving me nuts
    Posted: 08 December 2005 at 11:46am
I need some wisdom from some of you fine people.  I am confused about IsNull and how an If statement is working.
 
1. the DB is SQL Server 2000
2. i only have read access on the Table
2. the Column in the Table is System__bUser__bID, vchar, 256, allow nulls
 
If the value in System__bUser__bID is "Vault" I am to bypass the record otherwise I am to check the next selection field.
 
The code:
IF ((rsCommon("System__bUser__bID")) <> "Vault")
   IF "next field" bla bla bla.....
 
This works like a champ....UNTIL....rsCommon("System__bUser__bID"))  is Null.  If it is Null then the field is treated as it is equal "Vault"  hence my heightened ignorance.  If i add "OR IsNull(rsCommon("System__bUser__bID")) = True" then it works like a champ again.
 
I just don't understand how Null equals Vault.   Any guidance is welcome.
______________________
College Football Trivia
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2005 at 4:45pm
Sure it does not equal Vault, but NULL in databases actually means Nothing/no value.
NULL can become very confusing so I usually catch it at the database level like
Select IsNull(somefield,'') as somefield
That way it does not come down as null in the recordset and don't have to worry as them treating them just as a blank field but not nothing.
Uh I think I just confused myself, but I hope you understand what I mean.
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2005 at 1:27am
Remember null is not blank, and this is where most of the confusion comes from, null is raw, nothing, limbo, it does not contain a value, but it's not considered blank either, look at it as a unformatted disk, it is new, but it's not to be compared with a disk ready to take data in.

Check this alternate function: http://www.4guysfromrolla.com/webtech/031699-1.shtml
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.