procedure FieldValueToList(ADataSet: TDataSet; AFieldName: string;
AList: TStrings);
var
CurrentPoint: TBookmark;
begin
//如果数据集没有打开
if not ADataSet.Active then
Exit;
AList.Clear;
with ADataSet do
begin
DisableControls;
CurrentPoint := GetBookmark;
try
First;
while not Eof do
begin
AList.Add(FieldByName(AFieldName).AsString);
Next;
end;
finally
GotoBookmark(CurrentPoint);
EnableControls;
FreeBookmark(CurrentPoint);
end;
end;
end;