“未找到或更改行”随机弹出错误

发布于 2024-09-06 15:27:39 字数 174 浏览 1 评论 0原文

当我运行

DB.SubmitChanges();

时我偶尔会收到一条错误消息:“未找到或更改行”。 这个错误让我如此烦恼的原因是因为总是应该为这个查询找到一行,并且只有在有新的更改要做时才会进行更改。

我似乎不明白为什么会出现这个错误 我可以尝试在代码中查找出现此错误的一些常见原因吗?

When I run

DB.SubmitChanges();

I occasionally get an error that reads: "Row not found or changed".
The reason why this error bugs me so much is because there will always a row that should be found for this query, and changes are only made if there are new changes to make.

I can't seem to figure out why this error pops up
Are there some common reasons why this error shows up that I can try to find in my code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

记忆之渊 2024-09-13 15:27:39

可能有两个原因:

  • 行被删除
  • 行被另一个客户端更改

两者都是由于并发引起的,首先要检查的是这是否确实是多用户问题。

There could be 2 reasons:

  • the Row was deleted
  • the row was changed by another client

Both are due to concurrency, the first thing to check is if this could indeed be a multi-user issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文