触发后传回原始SQL操作行数?

发布于 2024-08-19 18:33:11 字数 189 浏览 4 评论 0原文

我有一段遗留的 VB6 代码,它将数据插入到 sql server 2000 数据库表中。该代码使用出于各种目的返回的行计数。

我们最近在表上放置了一个触发器,它调用存储过程来更新另一个表。现在看来,VB6 代码正在获取从触发过程返回的行计数,而不是原始操作。

是否有办法确保返回适当的行数?我们可以通过触发器“传递”原始行计数吗?

I have a piece of legacy VB6 code that is inserting data into a sql server 2000 database table. The code uses the row count returned for various purposes.

We recently put a trigger on the table which calls a stored procedure to update another table. It now appears that the VB6 code is picking up the row count returned from the triggered procedure, rather than the original operation.

Is there anyway of ensuring that the appropriate row count is returned? Can we "pass" the original row count through the trigger somehow?

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

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

发布评论

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

评论(1

影子是时光的心 2024-08-26 18:33:11

在触发器内打开 SET NOCOUNT ON

Turn SET NOCOUNT ON inside the trigger.

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