- changed status to resolved
TObjectDataset and enumerated type property
Issue #224
resolved
I have class that have enumerated type fields:
TConditionType = (GreaterThan, GreaterOrEqual, Equal, LessThan, LessOrEqual, NoSingnificance);
{$M+}
TProductCondition = class
private
fDateCondition: TConditionType;
fProductReleaseDate: TDateTime;
public
constructor Create();
destructor Destroy(); override;
published
property DateCondition: TConditionType read fDateCondition write fDateCondition;
property ProductReleaseDate: TDateTime read fProductReleaseDate write fProductReleaseDate;
end;
{$M-}
I use IList<TProductCondition> as data source for TObjectDataset. But when I connect dataset to datasource and dbgrid I get access violation. See screenshots from debug session:
DateCondition field is enumerated type, TObjectDataset create ftWideString field for it. But when detect varInt64 type then convert value to Int64:
Next try cast Int64 value to unicode string:
and raise access violation:
Comments (2)
-
repo owner -
repo owner - changed version to 1.2
- Log in to comment
fixed issue
#224→ <<cset 12175919f4cf>>