14 messages in com.mysql.lists.plusplusRe: Troubles wit DECIMAL(12,4)
FromSent OnAttachments
Bart Verstraete23 Dec 2007 00:18 
Warren Young26 Dec 2007 14:11 
Bart Verstraete04 Jan 2008 00:59 
Bart Verstraete04 Jan 2008 03:18 
Joel Fielder04 Jan 2008 03:37 
Bart Verstraete04 Jan 2008 03:48 
Joel Fielder04 Jan 2008 04:10 
Bart Verstraete04 Jan 2008 04:30 
Warren Young04 Jan 2008 05:37 
Warren Young04 Jan 2008 05:39 
Bart Verstraete04 Jan 2008 10:06 
Warren Young04 Jan 2008 11:10 
Bart Verstraete05 Jan 2008 01:32 
Jonathan Wakely05 Jan 2008 06:49 
Subject:Re: Troubles wit DECIMAL(12,4)
From:Bart Verstraete (bart@telenet.be)
Date:01/04/2008 10:06:47 AM
List:com.mysql.lists.plusplus

Warren Young schreef:

Bart Verstraete wrote:

void lfDbStaticText::SetLabel(mysqlpp::Null<mysqlpp::cchar*>& label) { #ifdef DEBUG std::cerr << label << std::endl; std::string testlabel = (label.is_null ? "" : std::string(label)); //

You're reinventing the "NullisBlank" wheel here. (Read the user manual section on handling SQL nulls.) Also, I doubt cchar* is the right thing here: who manages the memory it points to? I would define this parameter as:

mysqlpp::Null<std::string, mysqlpp::NullisBlank>

instead.

I don't understand your comment. About using std::string instead of cchar*