Mega Code Archive

 
Categories / Delphi / Strings
 

Why do i get errors when i call the add method for a tfielddefs

Because the documentation is wrong. There is an additional boolean flag that defines whether the field is required or not. The correct declaration for TFieldDefs.Add is as follows: procedure Add(const Name: string; DataType: TFieldType; Size: Word; Required: Boolean);