April 22, 2010 at 10:57 am
Is it possible for a SQL trigger to alert a VB or C# .net application?
April 22, 2010 at 11:59 am
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
April 22, 2010 at 12:53 pm
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.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply