Guten Morgen,
vielleicht kannst du dir irgendwie so behelfen:
Delphi-Quellcode:
function CreateField(ds: TDataSet; fldClass: TFieldClass; fldKind: TFieldKind;
const fldName, fldLabel: String; fldSize, fldWidth, fldIndex: Integer): TField;
begin
Result := fldClass.Create(ds);
with Result do
begin
Name := ds.Name + fldName;
Size := fldSize;
DisplayLabel := fldLabel;
DisplayWidth := fldWidth;
FieldName := fldName;
FieldKind := fldKind;
DataSet := ds;
Index := fldIndex;
end;
end;
Grüße vom marabu