Let VB.NET react on a SQL trigger

Posted on 2008-11-13
Last Modified: 2012-05-05

I wonder if it is possible to let 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,
Question by:ACAE
    LVL 69

    Accepted Solution

    you cannot subscribe to triggers but you could use SQL Server Notifications. See
    LVL 26

    Assisted Solution

    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.

    Author Comment

    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

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now