List:MySQL++« Previous MessageNext Message »
From:Jithin Emmanuel Date:March 19 2009 10:40am
Subject:checking NULL
View as plain text  
In my application I need to check if the value of a field in db (text type )
is NULL or not.
I have been using like this.
            row = (*i);
            name = row["name"].get_string();
             if(0 != name.compare("NULL")) {
But what if actually that field has a value NULL.
Is there a better way to check if a field is NULL or not in the retrieved
Result set


-- 
Regards
Jithin Emmanuel

Thread
checking NULLJithin Emmanuel19 Mar
  • Re: checking NULLWarren Young19 Mar
    • Re: checking NULLJithin Emmanuel19 Mar
      • Re: checking NULLWarren Young19 Mar
        • Re: checking NULLJithin Emmanuel20 Mar
          • Re: checking NULLWarren Young20 Mar
            • Re: checking NULLJithin Emmanuel20 Mar
              • Re: checking NULLJithin Emmanuel20 Mar
              • Re: checking NULLWarren Young20 Mar