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 Verstraete | 23 Dec |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 26 Dec |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • RE: Troubles wit DECIMAL(12,4) | Joel Fielder | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • RE: Troubles wit DECIMAL(12,4) | Joel Fielder | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 5 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Jonathan Wakely | 5 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 4 Jan |