Hi,
I would like to know how I can load records from query. I can use Assing() procedure but I don't want to reload the fields because I have more field in VirtualTable.
this is my code but it doesn't optimized
while not (lqryGrid.Eof) do
begin
dsetGrid.Append;
for I := 0 to dsetGrid.FieldCount - 1 do
begin
if (lqryGrid.FindField(dsetGrid.Fields.FieldName) nil) then
dsetGrid.Fields.AsVariant := lqryGrid.FieldByName(dsetGrid.Fields.FieldName).AsVariant;
end;
lqryGrid.Next;
end;
Thanks in advance