* Do not search for a semicolon anymore to check if there is more then one field in FieldValues

git-svn-id: trunk@10670 -
This commit is contained in:
joost 2008-04-15 21:12:52 +00:00
parent cf235145cb
commit a681f946f8

View File

@ -2144,18 +2144,18 @@ function TDataset.GetFieldValues(Fieldname: string): Variant;
var i: Integer;
FieldList: TList;
begin
if Pos(';', FieldName) <> 0 then begin
FieldList := TList.Create;
try
GetFieldList(FieldList, FieldName);
FieldList := TList.Create;
try
GetFieldList(FieldList, FieldName);
if FieldList.Count>1 then begin
Result := VarArrayCreate([0, FieldList.Count - 1], varVariant);
for i := 0 to FieldList.Count - 1 do
Result[i] := TField(FieldList[i]).Value;
finally
FieldList.Free;
end;
end else
Result := FieldByName(FieldName).Value
end else
Result := FieldByName(FieldName).Value;
finally
FieldList.Free;
end;
end;
procedure TDataset.SetFieldValues(Fieldname: string; Value: Variant);
@ -2164,7 +2164,7 @@ var
i : Integer;
FieldList: TList;
begin
if Pos(';', FieldName) <> 0 then begin
if VarIsArray(Value) then begin
FieldList := TList.Create;
try
GetFieldList(FieldList, FieldName);