{=================================================================
功 能: 字符分隔转换为数组
参 数: Source ch
返回值:
=================================================================}
Function SplitString(const Source, ch: String): TStrings;
var
temp: String;
i: Integer;
begin
Result := TStringList.Create;
temp := Source;
i := pos(ch, Source);
while i <> 0 do
begin
Result.Add(copy(temp, 0, i - 1));
Delete(temp, 1, i);
i := pos(ch, temp);
end;
Result.Add(temp);
end;
var
List : TStringList;
begin
List := TStringList.Create;
List.CommaText := ADOQuery1.FieldByName('Name').AsString;
edit1.Text := List[0];
edit2.Text := List[1];
edit3.Text := List[2];