Delphi帮助中的例子:
The example below creates a TFloatField object for a field named Amount accessed through a TSQLDataSet named SQLDataSet1.
var
T: TFloatField;
begin
SQLDataSet1.Close;
T := TFloatField.Create(SQLDataSet1);
T.Precision := 2;
T.FieldName := 'Amount';
T.Name := SQLDataSet1.Name + T.FieldName;
T.Index := SQLDataSet1.FieldCount;
T.DataSet := SQLDataSet1;
SQLDataSet1.FieldDefs.UpDate;
SQLDataSet1.Open;
end;