Warren Young wrote:
> The NullIsBlank and NullIsZero behaviors cause MySQL++ to pretend SQL
> NULL isn't a unique value, causing it to silently convert to either a
> blank string or integer 0, respectively. These behaviors are useful
> in cases where you can't get rid of the NULL attribute on the column,
> or NULL just doesn't have meaning in a certain context but does have
> meaning in others. If your application has no special use for NULL
> and you can change the DB, change the DB.
Thank you for the excellent explanation and sage advice, i understand
the situation much better now.
>
>>> something_that_requires_a_c_string =
>>> sql_char(it->mobileNumber).c_str();
>>>
>>> You need the explicit conversion in there because C++ won't
>>> implicitly do two casts in a row.
>> Understand, would I be better off using
>> static_cast<sql_char>(it->mobileNumber).c_str() ?
>
> Only substitute static_cast for (this_type)of_cast, never for
> this_type(of_conversion). The latter isn't actually a cast at all.
Of course it isn't I'm afraid I misread this.
Many thanks Warren.
Kind regards,
Brad