Menu ▾ ▴

#67 TdzDbColumnDescription.FormatData returns True for an Empty variant (operator precedence)

unread
nobody
2026-10-14
2026-10-14
No

TdzDbColumnDescription.FormatData in dbcreator/u_dzDbCreatorDescription.pas has

Result := not VarIsNull(_v) or VarIsEmpty(_v);

which parses as (not VarIsNull(_v)) or VarIsEmpty(_v), so an Empty variant returns True. It is meant to be not (VarIsNull(_v) or VarIsEmpty(_v)).

Currently harmless: SetDefaultValue turns Empty into Null, and ADO field values are not Empty.

Reported by the dzlib-sync session, found by reading the code.

Discussion


Log in to post a comment.