Sqldependency handle more than one table changes in onchange event

402 Views Asked by At

I am using sqldependency for notifying any changes in database by using onchange events. Can a single onchange event be used to handle more than one table changes?

1

There are 1 best solutions below

0
On

Yes, basically it works like any change in the result of your sql dependency query will be notified back. For example if a query like below is registered for sql dependency,

SELECT Name, Designation FROM Employee

Then, you will be notified everytime the result of the above query is changed in the database, whether a row is inserted or deleted or any of the Name or Designation is changed.

Any query under the constraints mentioned here can be registered for sql dependency.