c++builder - What is the difference between Variant.IsEmpty and Variant.IsNull? -
according (isempty, isnull), both return true
if vtype field of tvardata base class varempty
i don't know if there subtle difference between both methods, or 1 best/correct 1 check see if variant value has data or not.
generally null indicates missing or unknown data. empty indicates no data.
think of phone number field. if don't know if has telephone number @ all, field should null. if know doesn't have telephone, field should empty.
despite documentation says, isempty
checks value of varempty
, isnull
checks value of varnull
.
Comments
Post a Comment