客户端:
procedure TForm1.Btn_deleteClick(Sender: TObject);
var
uObj_CustomerInfo : ImtsUpdate_CustomerInfo;
vDatas_CustomerInfo : OleVariant;
iMaxErrors: Integer;
iErrorCount: Integer ;
test : WideString;
begin
CDS_customer.Delete;
//CDS_customer.Post;
vDatas_CustomerInfo := CDS_customer.Delta;
uObj_CustomerInfo := ComtsUpdate_CustomerInfo.CreateRemote('ly2001038');
uObj_CustomerInfo.Updatas_CustomerInfo(vDatas_CustomerInfo,-1,iErrorCount) ;
showmessage(test);
end;
服务器端更新对象代码
procedure TmtsUpdate_CustomerInfo.Updatas_CustomerInfo(vDatas: OleVariant;
iMaxError: Integer;
var iErrorCount: Integer;
var vtest: WideString);
var
//Options: TGetRecordOptions;
iRecOut : Integer;
OwnerData : OleVariant;
Params : OleVariant;
begin
try
//FMyDM.CDS_CustomerInfo.Active := true;
//FMyDM.CDS_CustomerInfo.Delta := vDatas;
//FMyDM.CDS_CustomerInfo.ApplyUpdates(0) ;
FMyDM.DCOMC_CustomerInfo.AppServer.UpdateDatas(vDatas, iMaxError,iErrorCount ) ;
SetComplete ;
except
SetAbort ;
end;
end;