List:MySQL++« Previous MessageNext Message »
From:Wolfgang Pausch Date:November 11 2009 5:36pm
Subject:Testing for NULL in a StoreQueryResult
View as plain text  

I believe that this is a simple question, but I wasn't able to figure out how 
it is done:

Given that I have a mysqlpp::StoreQueryResult result, access fields e.g. by 
result[n][0], how do I test wether such a field is null?  Preferably 
independent from the question wether a database column actually may be NULL. 

I tried to do a
if (result[n][0] == mysqlpp::null) {... }, however then the compiler says I 
would have a ambiguous overload for operator ==

What am I doing wrong?  I've read the chapter Handling SQL NULLs in the 
manual, but I don't get a clue how to test for null there.



PS: When using kmail before, your spamfilter didn't accept my mail (tried several times)
DSL-Preisknaller: DSL Komplettpakete von GMX schon für 
16,99 Euro mtl.!* Hier klicken:
Testing for NULL in a StoreQueryResultWolfgang Pausch11 Nov
  • Re: Testing for NULL in a StoreQueryResultWarren Young11 Nov