adoquery1.first; while not adoquery1.eof do begin try adoquery1.edit; adoquery1.fieldbyname('field1').value=value1; adoquery1.fieldbyname('field2').value=value2; //………… adoquery1.post; except abort;// process Exception end; application.processmessages;
end;
if you use clientdataset,maybe you should choose CallBack function .
Your must Add a interface to app Server to provde Applyupdates procedure information.The ApplyUpdates procedure will call the app Server onBeforUpdateRecord Event, this procedure will process the data your applied one by one.but the matter i think is how can you push client by server - Event support over com, you can find some idea to see "Delphi 5 programer guide"(DDG).
一定的用到Application.ProcessMessages
我不知道怎么写,放在哪里?还有当提交数据到服务器的时候,怎样设置数据包的大小?
>>一定的用到Application.ProcessMessages
>>我不知道怎么写,放在哪里?
Application.ProcessMessages在你向数据库提交一条后写。
while not adoquery1.eof do
begin
try
adoquery1.edit;
adoquery1.fieldbyname('field1').value=value1;
adoquery1.fieldbyname('field2').value=value2;
//…………
adoquery1.post; except
abort;// process Exception
end;
application.processmessages;
end;
有Application.processmessages,没有过程,在状态条上显示不出来呀!
对呀这样怎么办呢?