更新触发器错误 [英] Update Trigger error

查看:134
本文介绍了更新触发器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我收到无法找到行进行更新.自上次读取以来,某些值可能已更改."如果更新在表上触发了一个触发器,则返回错误.
以下内容对我而言似乎是倒退,但是:
1.如果触发器没有更新行中的任何内容,则出现错误.
2.如果触发器确实更新了该行中的某些内容,那么我没有收到错误.

I found that I was getting the "Row cannot be located for updating. Some values may have been changed since it was last read." error if the update fired a trigger on the table.
The following seems backwards to me, but:
1. If the trigger did not update anything in the row, I got the error.
2. If the trigger did update something in the row, I did NOT get the error.

推荐答案

只要想一想:该表是否包含主键?也许其他一些用户/程序进行了更改,从而影响了主键.您的UPDATE触发器有什么作用?请解释.
Just a thought: Does the table contain a primary key? Maybe some other user/program made changes effecting the primary key. What does your on UPDATE trigger do? Please explain.


这篇关于更新触发器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆