Sql server error "Result set created for update"

How to set "set nocount on" for a trigger? When I install it in a trigger and open the trigger code, I see that it has disappeared! My requirement to establish approval is as follows:

I am using a third-party Java API to create the SQL statement "UPDATE". The table being updated has a trigger that causes the following failure:

"com.microsoft.sqlserver.jdbc.SQLServerException: A result set was created for the update."

If I turn off the trigger, the problem will disappear. If the UPDATE statement runs on its own, there are no errors.

My questions: how to set "SET NOCOUNT ON"? If I change the trigger and add this line and open the trigger again, I noticed that the "nocount on" statement has disappeared.

I can’t install it at the server level because I don’t have permission to do this.

Thank! Bruce

+3
source share

Source: https://habr.com/ru/post/1531409/


All Articles