Show/Hide Toolbars

TMS Aurelius Documentation

Fields that relate to an enumerated type are integer fields that hold the ordinal value of the enumeration. Example:

 

type TSex = (tsMale, tsFemale);

 

TheSex := TSex(DS.FieldByName('Sex').AsInteger);

DS.FieldByName('Sex').AsInteger := Ord(tsFemale);

 

Alternatively, you can use the sufix ".EnumName" after the property name so you can read and write the values in string format (string fields)

 

SexName := DS.FieldByName('Sex.EnumName').AsString;

DS.FieldByName('Sex.EnumName').AsString := 'tsFemale';