procedure TForm1.BitBtn2Click(Sender: TObject);
begin
adostoredproc1.Parameters.ParamByName('@rq1').Value:=date1.Date;
adostoredproc1.Parameters.ParamByName('@rq2').Value:=date2.Date;
adostoredproc1.Open;
adostoredproc1.First;
while not  adostoredproc1.Eof do
begin
  with qtmp do
    begin
    close;
    sql.Clear;
    sql.Add('update f_wxgz set gz3='''+adostoredproc1.fieldbyname('产量').Value+'''-'''+adostoredproc1.fieldbyname('疵布').Value+'''  where f_wxgz.xm='''+adostoredproc1.fieldbyname('姓名').AsString+''' and nf='''+formatdatetime('yyyy',rq1.date)+''' and yf='''+formatdatetime('MM',rq1.date)+''' ');
    showmessage(sql.Text);
    ExecSQL;
    end;
 adostoredproc1.Next;
 end;
 end;