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