none
How to subscribe the notification services only for INSERT operations on a table using SQLDependency RRS feed

  • Question

  • Hi,

    Is there any way where i can configure my SQL, so that the Query Notifications using SQLDependency class will fire only for INSERT opertion on a table? In other words whenever i INSERT data into a table i should get a notification. I dont want the notification on UPDATE. Please do the needful

     

    Thanks,

    Venkat Ram

    • Moved by Pawel Marciniak Tuesday, August 24, 2010 5:01 PM (From:SQL Service Broker)
    Tuesday, August 24, 2010 11:15 AM

Answers

  • Hi Venkat,
     
    This isn't possible with Query Notifications. With Query Notifications, you can only subscribe to ALL changes on the results of a particular query. It's meant for managing a cache. In fact, with QN, you don't get a notification that indicates which particular row(s) have changed, only that something has changed. You're then supposed to refresh the cache and subscribe again (by reissuing the same query + notification).
     
    Cheers,
    Bob Beauchemin
    SQLskills
    "VenkatRam_n15" wrote in message news:4fa61502-6606-4e64-8d0d-9d867ad2d11e...

    Hi,

    Is there any way where i can configure my SQL, so that the Query Notifications using SQLDependency class will fire only for INSERT opertion on a table? In other words whenever i INSERT data into a table i should get a notification. I dont want the notification on UPDATE. Please do the needful

     

    Thanks,

    Venkat Ram

    • Marked as answer by VenkatRam_n15 Wednesday, August 25, 2010 7:07 AM
    Tuesday, August 24, 2010 5:56 PM