TVirtualQuery Bug With NULL TDateTime Fields
Posted: Thu 24 Aug 2017 22:13
Howdy!
If a dataset's TDate/TTime fields are set NULL fields and a TVirtualQuery statement is executed against the dataset, the untouched TDate/TTime NULL fields are set to 0 instead of setting the field's Variant value as NULL (Null()). Setting a TDate/TTime field to just 0 when it was a NULL value from the underlying source dataset causes the TField's IsNull property to return false instead of true and values in data-aware controls are shown as 12/30/1899 (Delphi NULL default value).
All the best,
Aggie85
If a dataset's TDate/TTime fields are set NULL fields and a TVirtualQuery statement is executed against the dataset, the untouched TDate/TTime NULL fields are set to 0 instead of setting the field's Variant value as NULL (Null()). Setting a TDate/TTime field to just 0 when it was a NULL value from the underlying source dataset causes the TField's IsNull property to return false instead of true and values in data-aware controls are shown as 12/30/1899 (Delphi NULL default value).
All the best,
Aggie85