Why the pointor is moved into next record?

DetailDataSet:TClientDataSet;
When I commentted the  content,the DetailDataSet pointor is normal for
moving.
If I uncomment the content,the pointor of dataset jump 1 into 3..5,7 and so
on.
Have the pointor related with TClientDataSet.FieldByName ????

while not DetailDataSet.Eof do
        begin
            reqLine:=0;
            if DetailGrid.Fields[0].AsInteger=1 then
                begin
                    if vStr='' then
                       begin
                            aVar[0]:=FetchBillNO('TmmPOMAAForm',Date);
                            vStr:=aVar[0];
                       end
                    else
                       aVar[0]:=vStr;
                    aVar[1]:=now;
                    aVar[2]:=gblData.SysUserId;
                    aVar[3]:=gblData.SysUserId;
                    aVar[4]:=DetailDataSet.FieldByName('Plan_id').AsString;

aVar[5]:=DetailDataSet.FieldByName('Plan_line').AsInteger;
                    if PerformProc(aVar,reqLine) then
                       begin
                         DetailDataSet.Edit;
                         {//Content of comment

DetailDataSet.FieldByName('Req_id').AsString:=aVar[0];

DetailDataSet.FieldByName('Req_line').AsInteger:=reqLine;

DetailDataSet.FieldByName('req_date').AsDateTime:=aVar[1];

DetailDataSet.FieldByName('taken_by').AsString:=aVar[2];
                         }
                       end;
                end;
            DetailDataSet.Next;
        end;
  finally
    DetailDataSet.EnableControls;
  end;