我有一个TClientDataSet,我想在其字段定义中添加如下的自定义类型:
TDay = (Mon=1, Tue, Wed, Thu, Fri, Sat, Sun);
现在我将数据集定义如下:
aDataSet := TClientDataSet.Create(nil);
with aDataSet do
begin
FieldDefs.Add('Reference', ftString, 8);
FieldDefs.Add('Archived',ftString,3);
FieldDefs.Add('Problem', ftWideString, 48);
FieldDefs.Add('Solution', ftWideString, 70);
//FieldDefs.Add('Day', Tday type?????? // is it even possible?
IndexFieldNames := 'Reference';
CreateDataSet;
end;
如何将每列与TDay关联并具有TDay类型列?甚至有可能这样做吗?