触发后传回原始SQL操作行数?
我有一段遗留的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在触发器内打开
SET NOCOUNT ON
。Turn
SET NOCOUNT ON
inside the trigger.