Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Notification services

Notification services

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadmin
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hadad
    wrote on last edited by
    #1

    Hello, I'm creating a windows service that listens to a sql server database table each second when any insertion occurs this windows service make a lot of work, to accomplish this task I firstly think in the notification services but it creates an auto generated windows service which I can not edit to do my logic and in the same time it works(the notification services) just like my windows service in listening to the table every Generator Quanta. The question is which is the best implementing my one windows service or using the notification services to send notifications to filesystemwatcher then my service check this file every second? Thanks

    Dad

    W 1 Reply Last reply
    0
    • H hadad

      Hello, I'm creating a windows service that listens to a sql server database table each second when any insertion occurs this windows service make a lot of work, to accomplish this task I firstly think in the notification services but it creates an auto generated windows service which I can not edit to do my logic and in the same time it works(the notification services) just like my windows service in listening to the table every Generator Quanta. The question is which is the best implementing my one windows service or using the notification services to send notifications to filesystemwatcher then my service check this file every second? Thanks

      Dad

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Could you use SqlDependency instead. For example have a look at: Detecting Changes with SqlDependency (ADO.NET)[^]

      The need to optimize rises from a bad design.My articles[^]

      G 1 Reply Last reply
      0
      • W Wendelius

        Could you use SqlDependency instead. For example have a look at: Detecting Changes with SqlDependency (ADO.NET)[^]

        The need to optimize rises from a bad design.My articles[^]

        G Offline
        G Offline
        Giorgi Dalakishvili
        wrote on last edited by
        #3

        Can SqlDependency detect when a row is inserted?

        Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

        W 1 Reply Last reply
        0
        • G Giorgi Dalakishvili

          Can SqlDependency detect when a row is inserted?

          Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          Yes, since if the result set based on the select statement is changed, the OnChange event is triggered. This actually means that all modifications (updates, inserts and deletes) are notified as long as they change the result. Or at least this is my understanding :) There's a bit old but quite good documentation about this: Query Notifications in ADO.NET 2.0 [^] Mika

          The need to optimize rises from a bad design.My articles[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups