CodePudding user response:
Should be the Null type, the Boolean type conversion, error-prone,Find the original code error sources,
CodePudding user response:
When operation XML attributes, if there is no corresponding attributes, such as: bFlag:=Node. Atrributes [' ABC ']Will encounter this error, the main reason, is lazy, direct use of the variant type assignment, but the variant sometimes empty, will lead to errors
CodePudding user response:
Assign the value of the Boolean type is emptyCodePudding user response:
You have the code?CodePudding user response:
In SQL using ISNULL function allISNULL (FieldName, ReturnNullDefVal ReturnNotNullDefVal)
In Delphi, a custom IIF function
The function the IIF (BoolenExpress: Boolean; ReturnTrueValue ReturnFalseValue: Varaint) : Varaintl
The begin
IF a Boolean THEN Result:=ReturnTrueValue
The ELSE
Result:=ReturnFalseValue;
end;
CodePudding user response:
Take less than the value, or a null value is empty, you can add a judgment to avoid empty