try
lvForm:=TSRMM.Create(context);
if lvForm.ShowModal=Business.Forms.Controls.mrOk then
begin
DataSetquery1.First;
DataSetquery2.Close;
DataSetquery2.Open;
while not DataSetquery1.Eof do
begin
with DatasetQuery2 do
begin
insert;
FieldByName('CREATENAME').AsString:=DataSetquery1.FieldByName('CREATENAME').AsString;
FieldByName('CREATEDATE').AsString:=DataSetquery1.FieldByName('CREATEDATE').AsString;
FieldByName('UPDATENAME').AsString:=DataSetquery1.FieldByName('UPDATENAME').AsString;
FieldByName('UPDATEDATE').AsString:=DataSetquery1.FieldByName('UPDATEDATE').AsString;
FieldByName('SERIES').AsString:=DataSetquery1.FieldByName('SERIES').AsString;
FieldByName('DELNO').AsString:=DataSetquery1.FieldByName('DELNO').AsString;
FieldByName('DELTYPE').AsString:=DataSetquery1.FieldByName('DELTYPE').AsString;
FieldByName('ORDERDATE').AsString:=DataSetquery1.FieldByName('ORDERDATE').AsString;
FieldByName('REVISE').AsString:=DataSetquery1.FieldByName('REVISE').AsString;
FieldByName('CUSTNO').AsString:=DataSetquery1.FieldByName('CUSTNO').AsString;
FieldByName('CONTNO').AsString:=DataSetquery1.FieldByName('CONTNO').AsString;
FieldByName('TOWHO').AsString:=DataSetquery1.FieldByName('TOWHO').AsString;
FieldByName('TOWHOADDR').AsString:=DataSetquery1.FieldByName('TOWHOADDR').AsString;
FieldByName('DELDATE').AsString:=DataSetquery1.FieldByName('DELDATE').AsString;
FieldByName('SEQNO').AsString:=DataSetquery1.FieldByName('SEQNO').AsString;
FieldByName('STUFFNO').AsString:=DataSetquery1.FieldByName('STUFFNO').AsString;
FieldByName('PRODNO').AsString:=DataSetquery1.FieldByName('PRODNO').AsString;
FieldByName('WIDTHKIND').AsString:=DataSetquery1.FieldByName('WIDTHKIND').AsString;
FieldByName('UPWIDTH').AsString:=DataSetquery1.FieldByName('UPWIDTH').AsString;
FieldByName('UPWEIGHT').AsString:=DataSetquery1.FieldByName('UPWEIGHT').AsString;
FieldByName('COLOR').AsString:=DataSetquery1.FieldByName('COLOR').AsString;
FieldByName('COLORCARD').AsString:=DataSetquery1.FieldByName('COLORCARD').AsString;
FieldByName('RIGHTSTATE').AsString:=DataSetquery1.FieldByName('RIGHTSTATE').AsString;
FieldByName('ISDEBIT').AsString:=DataSetquery1.FieldByName('ISDEBIT').AsString;
FieldByName('ISWORK').AsString:=DataSetquery1.FieldByName('ISWORK').AsString;
FieldByName('ARSEQNO').AsString:=DataSetquery1.FieldByName('ARSEQNO').AsString;
FieldByName('ARSEQEXT').AsString:=DataSetquery1.FieldByName('ARSEQEXT').AsString;
FieldByName('TGETRATE').AsString:=DataSetquery1.FieldByName('TGETRATE').AsString;
FieldByName('FINISHDATE').AsString:=DataSetquery1.FieldByName('FINISHDATE').AsString;
FieldByName('TRACKNO').AsString:=DataSetquery1.FieldByName('TRACKNO').AsString;
FieldByName('REMARK').AsString:=DataSetquery1.FieldByName('REMARK').AsString;
FieldByName('GETGOODS').AsString:=DataSetquery1.FieldByName('GETGOODS').AsString;
FieldByName('DELTOWHO').AsString:=DataSetquery1.FieldByName('DELTOWHO').AsString;
FieldByName('DELPN').AsString:=DataSetquery1.FieldByName('DELPN').AsString;
FieldByName('DELQTY').AsString:=DataSetquery1.FieldByName('DELQTY').AsString;
FieldByName('DELQTYYARD').AsString:=DataSetquery1.FieldByName('DELQTYYARD').AsString;
FieldByName('FROMWHO').AsString:=DataSetquery1.FieldByName('FROMWHO').AsString;
FieldByName('OLDSEQ').AsString:=DataSetquery1.FieldByName('OLDSEQ').AsString;
FieldByName('DYESEQ').AsString:=DataSetquery1.FieldByName('DYESEQ').AsString;
FieldByName('DELKIND').AsString:=DataSetquery1.FieldByName('DELKIND').AsString;
FieldByName('FLOWFLAG').AsString:=DataSetquery1.FieldByName('FLOWFLAG').AsString;
FieldByName('DELMETER').AsString:=DataSetquery1.FieldByName('DELMETER').AsString;
FieldByName('DELLB').AsString:=DataSetquery1.FieldByName('DELLB').AsString;
FieldByName('ORDERNO').AsString:=DataSetquery1.FieldByName('ORDERNO').AsString;
FieldByName('ACCTYPE').AsString:=DataSetquery1.FieldByName('ACCTYPE').AsString;
end;
DataSetquery1.Next;
end;
try
DataSetquery2.ApplyUpdates(-1);
v_status:='Ledwayknit.delivery备份到server243成功,';
except
v_status:='Ledwayknit.delivery备份server243失败,';
dialogs.ShowMessage(v_status);
exit;
end;
报错
invoke batch method error, error occur during invoke ApplyUpdates method, Parameter #32as not been set.
DataSetquery2的更新语句是
insert into ledwayknit.delivery(createname,createdate,updatename,updatedate,series,delno,deltype,orderdate,revise,custno,contno,towho,towhoabbr,deldate,seqno,stuffno,prodno,widthkind,upwidth,dnwidth,upweight,dnweight,color,colorcard,rightstate,isdebit,iswork,arseqno,arseqext,tgetrate,finishdate,trackno,remark,getgoods,deltowho,delpn,delqty,delqtyyard,fromwho,oleseq,dyeseq,delkind,flowflag,delmeter,dellb,orderno,acctype)
values(:createname,:createdate,:updatename,:updatedate,:series,:delno,:deltype,rderdate,:revise,:custno,:contno,:towho,:towhoabbr,:deldate,:seqno,:stuffno,:prodno,:widthkind,:upwidth,:dnwidth,:upweight,:dnweight,:color,:colorcard,:rightstate,:isdebit,:iswork,:arseqno,:arseqext,:tgetrate,:finishdate,:trackno,:remark,:getgoods,:deltowho,:delpn,:delqty,:delqtyyard,:fromwho,leseq,:dyeseq,:delkind,:flowflag,:delmeter,:dellb,rderno,:acctype) |