必須使用事務
declare @sql1 varchar(255)
select @sql1='update Goods set Name='+''''+'ABCD'+''''+',ShortName='+''''+'ABC'+''''+'where GoodsID=4655'
begin tran
exec sp_passthrough_user '訂閱用戶ID'
exec sp_passthrough_subscription 'BP_HQ_BDATA'
exec sp_passthrough @sql1
exec sp_passthrough_stop
commit tran