Its still not working for me.
row = (*i);
name = row["name"].get_string();
// mysqlpp::Null<unsigned char>
nullField(mysqlpp::null);
if(row["name"] == mysqlpp::null) {
cout << " NULL VALUE" <<
endl;
}
I am getting error
test.cpp: In function `void getName()':
test.cpp:58: error: no match for 'operator==' in
'mysqlpp::Row::operator[](const char*) const(((const char*)"name")) ==
mysqlpp::null'
/home/y/include/mysql++/const_string.h:189: note: candidates are: bool
mysqlpp::operator==(mysqlpp::const_string&, mysqlpp::const_string&)
/home/y/include/mysql++/type_info.h:329: note: bool
mysqlpp::operator==(const mysqlpp::mysql_type_info&, const
mysqlpp::mysql_type_info&)
/home/y/include/mysql++/type_info.h:342: note: bool
mysqlpp::operator==(const std::type_info&, const mysqlpp::mysql_type_info&)
/home/y/include/mysql++/type_info.h:356: note: bool
mysqlpp::operator==(const mysqlpp::mysql_type_info&, const std::type_info&)
It seems that the way I am checking for error is wrong. How do I do it
correctly. Please help.
On Thu, Mar 19, 2009 at 11:03 PM, Warren Young <mysqlpp@stripped> wrote:
> On Mar 19, 2009, at 6:47 AM, Jithin Emmanuel wrote:
>
> if(nullField == row["name"]) {
>>
>
> if (row["name"] == mysqlpp::null)
>
> It looks like you're one of those with the habit of reversing the order of
> your equality test terms to avoid errors with "=" vs "==". I'm not sure you
> can get away with that with mysqlpp::null.
>
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=1
>
>
--
Regards
Jithin Emmanuel
Phyllis Diller - "Never go to bed mad. Stay up and fight."