List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:January 4 2008 1:37pm
Subject:Re: Troubles wit DECIMAL(12,4)
View as plain text  
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.
Thread
Troubles wit DECIMAL(12,4)Bart Verstraete23 Dec
  • Re: Troubles wit DECIMAL(12,4)Warren Young26 Dec
    • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
      • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
        • RE: Troubles wit DECIMAL(12,4)Joel Fielder4 Jan
          • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
            • RE: Troubles wit DECIMAL(12,4)Joel Fielder4 Jan
              • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
        • Re: Troubles wit DECIMAL(12,4)Warren Young4 Jan
          • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
            • Re: Troubles wit DECIMAL(12,4)Warren Young4 Jan
              • Re: Troubles wit DECIMAL(12,4)Bart Verstraete5 Jan
                • Re: Troubles wit DECIMAL(12,4)Jonathan Wakely5 Jan
      • Re: Troubles wit DECIMAL(12,4)Warren Young4 Jan