0

I am developing an application with SQL Dependency feature.

My problem is when I stop application (SqlDependency.Stop() method is executed) and I try to run stored procedure with ANSI_NULLS and QUOTED_IDENTIFIER set to OFF, I'm getting error:

UPDATE failed because the following SET options have incorrect settings: 'ANSI_NULLS, QUOTED_IDENTIFIER'...

Stored procedure is making an update on table which was watched by SqlDependency, I do not want to change it because it is from third-party software.

SqlDependency uses 'sa' user to connect to DB also I tried other user with no luck.

For now I must restart SQL Server to make it work, but this is unacceptable.

I tried to run this query and kill all subscription:

KILL QUERY NOTIFICATION SUBSCRIPTION @Id

but I still get same error.

Can someone help me with resolving this problem ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
SzymonB
  • 133
  • 6
  • What ahppens if you run the SP in SQL management studio, do you get the same error? On the face of it it looks as though the SP is wrong. – Ben Robinson Dec 03 '14 at 12:32
  • Yes, I get same error, but after server restart it works correctly seems then sqldependency stops working. – SzymonB Dec 03 '14 at 12:47

0 Answers0