uses
TypInfo;procedure TForm1.FormCreate(Sender: TObject);
begin
if not Table1.Active then Exit;
Caption := GetEnumName(TypeInfo(TFieldType),
Ord(Table1.FieldByName('你的字段').DataType));
end;
TypInfo;procedure TForm1.FormCreate(Sender: TObject);
begin
if not Table1.Active then Exit;
Caption := GetEnumName(TypeInfo(TFieldType),
Ord(Table1.FieldByName('你的字段').DataType));
end;
'Boolean', 'Float', 'Currency', 'BCD', 'Date', 'Time', 'DateTime',
'Bytes', 'VarBytes', 'AutoInc', 'Blob', 'Memo', 'Graphic', 'FmtMemo',
'ParadoxOle', 'DBaseOle', 'TypedBinary', 'Cursor', 'FixedChar',
'WideString', 'Largeint', 'ADT', 'Array', 'Reference', 'DataSet',
'OraBlob', 'OraClob', 'Variant', 'Interface', 'IDispatch', 'Guid');procedure TForm1.ListBox12Click(Sender: TObject);//源字段列表//
var i : integer;
begin
Sfield := ListBox12.Items[i];
if DM.Table1.FieldDefs[i].Required then //字段的非空属性//
Ets2.Text := 'Y'
else
Ets2.Text := 'N'; i := strtoint(vartostr(DM.Table1.FieldDefs[i].datatype)); //字段类型//
Ets1.Text := ftype[i]; case DM.Table1.FieldDefs[i].DataType of //字段的大小//
ftString, ftBCD, ftBytes, ftVarBytes, ftBlob, ftMemo,
ftGraphic: Ets3.Text := IntToStr(DM.Table1.FieldDefs[i].Size);
else
Ets3.Text := '';
end;
end;