日期:2014-05-18  浏览次数:20635 次

更新带有触发器的表,出现不能update现像,如何解决
某一个表CustomerInfo,它有update,delete,insert等触发器,这些触发器的一个共同点是:跨入不同的数据库更新同名表。比如:服务器有A,B两数据库,都有表名CustomerInfo,在update,delete,insert   A库的CustomerInof时,触发器会更新B数据库的CustomerInfo。同样更新B库的CustomerInfo,也会通过触发器更新A库的CustomerInfo表。现在,我想通过sql语句更新某一个库的CustomerInfo表,
请问:应如何写update语句?

我在A库的查询器里的update语句是:
update   CustomerInfo   set   cInvName= '华为 '   where(cInvCode= 'SS3.691.691 ')

报错:


[Microsoft][ODBC   SQL   Server   Driver][DBNETLIB]ConnectionCheckForData   (CheckforData()).
服务器:   消息   11,级别   16,状态   1,行   0
一般性网络错误。请检查网络文档。

连接中断

------解决方案--------------------
create trigger on a
for update
as
update b.dbo.table set col=value