在数据字典应用的中需要动态得到Delphi支持的所有的字段类型,并显示uses DB,typinfo;GetFieldTypeAllVals(list: TStrings);
var
p: PTypeData;
i: Integer;
begin
list.Clear;
p := TypInfo.GetTypeData(TypeInfo(TFieldType));
list.beginUpdate;
try
for i := p^.MinValue to p^.MaxValue do
list.Append(TypInfo.GetEnumName(TypeInfo(TFieldType),i));
finally
list.EndUpdate;
end;
end;
var
p: PTypeData;
i: Integer;
begin
list.Clear;
p := TypInfo.GetTypeData(TypeInfo(TFieldType));
list.beginUpdate;
try
for i := p^.MinValue to p^.MaxValue do
list.Append(TypInfo.GetEnumName(TypeInfo(TFieldType),i));
finally
list.EndUpdate;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货