C
chenp1688
Unregistered / Unconfirmed
GUEST, unregistred user!
begin ADOQCC01.Close; ADOQCC01.SQL.Clear; ADOQCC01.SQL.Add('select FItemID,Fnumber,FunitID,Fstock from CH_FItemInitial '); ADOQCC01.Open; //第一种情况,在这此先把ADODataSet1缓存的记录清空. while not ADOQCC01.Eof do begin //第二种情况;如果第一情况不能实现,要在这里加上一个判断语句, //判断ADODataSet1缓存里是否已经存 //在记录,如不存在记执行下面的语句,请教各位指教! ADODataSet1.Edit; ADODataSet1.Append; ADODataSet1.FieldByName('FItemID').AsInteger:=ADOQCC01.FieldByName('FItemID').AsInteger; ADODataSet1.FieldByName('Fnumber').AsString:=ADOQCC01.FieldByName('Fnumber').AsString; ADODataSet1.FieldByName('FunitID').AsInteger:=ADOQCC01.FieldByName('FunitID').AsInteger; ADODataSet1.FieldByName('Fstock').AsInteger:=ADOQCC01.FieldByName('Fstock').AsInteger; ADODataSet1.UpdateBatch; ADOQCC01.Next; end; end;