mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 14:09:19 +02:00
* 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:
parent
cf235145cb
commit
a681f946f8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user