radders
radders

Reputation: 923

sql server notifying running programs

I have a database which can be updated from several instances of a C# .NET program. I wish to have each of those programs notified when rows in a table change.

An obvious (but possibly quite wrong) approach might be to register a callback function within the .NET program with the CLR Stored Trigger in the SQL Server, so that it gets called when the trigger fires.

Is this the correct/possible way, or is there a better alternative?

Thanks

Upvotes: 3

Views: 56

Answers (1)

nvoigt
nvoigt

Reputation: 77304

You could use SqlDependency to get notifications.

Upvotes: 3

Related Questions