Hello,
I get an entity Person and want to assign the fields to some edits.
Edit1.Text := Person.Number; // nullable String-Field
If "HasValue" is false (NULL data in DB), I get an exception.
If "HasValue" is false (NULL data in DB), I get an exception.
So I must write
If Person.Number.HasValue then Edit1.Text := Person.Number;
This is laborious. Is this the only way?
This is laborious. Is this the only way?