Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

RE: Empy String vs. Null

Discussion in 'Information Technology' started by Arvin Meyer [MVP], Nov 15, 2005.

Tags:
  1. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    A NULL is an unknown; an empty string is unfilled:

    Null <> Null
    Null + 1 = Null

    "" = ""
    "" + "a" = "a"

    To cover both situations in code use the constant: vbNullString as in:

    If Len([MyControl] & vbNullString) > 0 Then

    Which means there's a value in it. If it equalled 0 then it would be either
    Null or empty.

    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access


    "Paul Hammond" wrote:

    > I should know and understand this, but I don't. Could somebody please
    > review the difference between these to values?
    >
    > I have a column that either contains a code or it does not, but I have to
    > test for both null and "". I just can't understand the difference.
    >
    > Please 'splain it to me.
    >
    > TIA
    >
    > Paul Hammond
    > --
     
  2. Loading...

    Similar Threads Forum Date
    India Akal Takht Chief Wants Obama to Take Stringent Measures to Check Hate Crimes against Sikhs Breaking News Sep 25, 2013
    Preserving Ancient String Instruments Gurmat Sangeet Feb 28, 2011
    Vibrating String Interfaith Dialogues Dec 14, 2007
    Sikh News String of welfare measures for Dalits in Punjab (Outlook India) Breaking News Oct 26, 2007

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page