Hi Folks,
Given Entity TPerson and Property FirstName I can do
MyPerson ;= TPerson.Create;
MyPerson.FirstName := 'Greg';
But using typinfo.pas and Delphi RTTI
SetPropValue(MyPerson,'FirstName','Greg');
does not recognise 'FirstName' as a property of MyPerson.
and GetPropInfo(MyPerson,'FirstName') returns nil
Can I do something like Myperson.Props['FirstName'] := 'Greg' on a regular property as it is on Dynamic properties?
A workaround I know is to use the Aurelius Dataset and Fieldbyname('FirstName') but I would rather not.
Cheers Greg