2

I build some service that on start open two threads, each one start SqlDependency with same sql connection but the command its different.

Its possible? its seems to working, but after some will when the on change event need wake up its doesnt.

Thanks.

Daniel Tshuva
  • 483
  • 4
  • 12
  • Connection sharing between threads should *not* be done - unless it is *explicitly* stated as being safe/valid, and under what conditions. (That is, the burden of proof is on the consumer - you - to find such documentation.) –  Mar 10 '13 at 10:54

1 Answers1

2

Yes. You can submit any number of SqlCommands to be notified, with same or different SQL text (query), on one more many SqlConnection objects.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569