From: Warren Young Date: April 30 2010 7:11am Subject: Re: create a Null field List-Archive: http://lists.mysql.com/plusplus/8933 Message-Id: MIME-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Apr 30, 2010, at 12:54 AM, Andrej van der Zee wrote: > Thank you for your reply. That I tried but get the following (I am = using 3.08): >=20 > /usr/local/include/mysql++/null.h: In member function =91void = parsers::ip::dbdump()=92: > /usr/local/include/mysql++/null.h:55: error: = =91mysqlpp::null_type::operator CannotConvertNullToAnyOtherDataType() = const [with CannotConvertNullToAnyOtherDataType =3D unsigned int]=92 is = protected Ah, static typing. Gotta love it. You'll have to do it with if/else = instead of the alternation operator: if (h) db_host_id =3D h->_db_host_id; else db_host_id =3D mysqlpp::null; That's *somewhat* cleaner than your current code.=