baran
baran

Reputation: 49

send notification message to client

I have a table in server. I want to show a notification message in client when that table will update. How can i do that? excuse me because I'm beginner in SQL

Upvotes: 1

Views: 1945

Answers (3)

RiverWay
RiverWay

Reputation: 41

How about SQL2008 Query Notification? This is something different than Notification Services which was removed in SQL 2008. Query Notification is basically creating SqlDependency Object in a client application with a SELECT Query and then the SQL 2008 server notifies when there was any change in THE query result. Here's some client side code example.

I have never used this myself but am looking for a very minimalistic intranet chat client based on SQL database.

Happy coding.

Upvotes: 1

Pekka
Pekka

Reputation: 449415

Usually, this kind of thing should not be done on the database layer, but on the application layer where the change is initiated.

The database server is not really equipped to do this. It doesn't have E-Mail capabilities, and it has no notification system like the kind you talk about.

Upvotes: 1

ratty
ratty

Reputation: 13434

you can use triggers for that.. here some notes for triggers

SQL triggers

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/sqlp/rbafysqltrig.htm

Introduction to SQL Triggers

http://www.mysqltutorial.org/sql-triggers.aspx

Upvotes: 1

Related Questions