• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 569
  • Last Modified:

Let VB.NET react on a SQL trigger


I wonder if it is possible to let vb.net react on an insert/delete/modify statement in SQL.
This is my situation: I have a planning tool that visualises the planning of an employee. It is possible that several uses use the planning, so I would like to display the changes one user makes on the planning of another user. This means that if user A plans something for employee X, this is immediately visible in the planning form of user B.

To display the planning we use one table, so what I would like is some kind of 'Listener' in VB.NET that reacts on an insert/modify/delete statement in that table, so the appropriate action can be taken.

I know it is possible to search every x seconds for a change in the table (using a 'last modified' timestamp), but that means a lot of queries in the SQL database (= PULL method). I would like a 'PUSH' method.

Kind regards,
2 Solutions
Éric MoreauSenior .Net ConsultantCommented:
you cannot subscribe to triggers but you could use SQL Server Notifications. See http://www.sqljunkies.ddj.com/Article/38D95C18-D0AB-4B00-9CF5-80940309E68C.scuk
Eddie ShipmanAll-around developerCommented:
You can also use MSMQ messages.


We used to use this with Delphi to be notified of changes in a database for our controls to refresh themselves.
ACAEAuthor Commented:
Hi experts,

Thx for your help. I will investigate the notifications, and if that doesn't work, I will chek the message queues.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now