The report is show but this exception is throw:
EConvertError "Cannot assign a TFieldList to a TStringList"
I use C++ Builder 6 Pro.
Thanks
I try it by this:
changed frxDBSet.pas
procedure TfrxDBDataset.GetFieldList(List: TStrings);
var
i: Integer;
begin
List.Clear;
if FieldAliases.Count = 0 then
begin
try
if FDS <> nil then
begin
//FDS.GetFieldNames(TStrings(List)); <--old
for i := 0 to FDS.FieldCount - 1 do <-- new
List.Add(FDS.Fields.FullName); <--new
//
end;
except
end;
end
else
begin
for i := 0 to FieldAliases.Count - 1 do
if Pos('-', FieldAliases.Names) <> 1 then
List.Add(FieldAliases.Values[FieldAliases.Names]);
end;
end;
Comments
changed frxDBSet.pas
procedure TfrxDBDataset.GetFieldList(List: TStrings);
var
i: Integer;
begin
List.Clear;
if FieldAliases.Count = 0 then
begin
try
if FDS <> nil then
begin
//FDS.GetFieldNames(TStrings(List)); <--old
for i := 0 to FDS.FieldCount - 1 do <-- new
List.Add(FDS.Fields.FullName); <--new
//
end;
except
end;
end
else
begin
for i := 0 to FieldAliases.Count - 1 do
if Pos('-', FieldAliases.Names) <> 1 then
List.Add(FieldAliases.Values[FieldAliases.Names]);
end;
end;