List:MySQL++« Previous MessageNext Message »
From:Bart Verstraete Date:January 4 2008 6:07pm
Subject:Re: Troubles wit DECIMAL(12,4)
View as plain text  
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*
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