Triggers to VB.net C# ?

  • Is it possible for a SQL trigger to alert a VB or C# .net application?

  • the most common way is to have a trigger enter a row in a specific table; the your application can scan the table every minute or so for any changes, and do whatever it needs to do with (or to) the changed data. i usually ad a "Processed" column, so the application can mark rows it already fiddled with, for example.

    you could send an email, but then you need to build something to POP3 a mailbox every minute or so...

    maybe you could create a service broker job to be launched asyncronously whenever the trigger is fired, bu ti am really weak on the service broker. that job could call your app (maybe?)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • This may be a candidate for Notification Services. You can have your VB or C# app 'subscribe' to a recordset and it will get a notification when that recordset changes.

    I have not yet designed a solution that uses Notification Services, but this, to me, is a great place to put it to the test.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply