title: sql server error "A result set was generated for update"
body: <p>How do I set "set nocount on" for a trigger? When I set it in the trigger and open the trigger code, I see it has disappeared! My requirement to set the statement comes from below:</p>
  
  <p>I am using Java third party API to make a SQL "UPDATE" statement. The table being updated has a trigger on it which is causing the following failure:</p>
  
  <p>"com.microsoft.sqlserver.jdbc.SQLServerException: A result set was generated for update."</p>
  
  <p>If I disable the trigger, the issue disappears. If the UPDATE statement is run by itself there are no errors.</p>
  
  <p>My questions is how can I set "SET NOCOUNT ON"?? If I modify the trigger and add this line, and open the trigger again, I notice that the "nocount on" statement has disappeared. </p>
  
  <p>I am unable to set it at "server" level as I do not have permission to do this.</p>
  
  <p>Thanks!
  Bruce</p>