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. Data Source Change Notifications

Data Source Change Notifications

Scheduled Pinned Locked Moved Database
announcementcssdatabasesysadminhelp
3 Posts 2 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.
  • P Offline
    P Offline
    ProffK
    wrote on last edited by
    #1

    I've just been posed a challenge: to update a DataGrid on one client when another client changes the source table for that grid on a central database, all three connected on a standard TCP/IP network. Now I vaguely (probably incorrectly) remember something about earlier versions of ADO being able to detect changes in source data, but I may be senile already, so I said, "Yes, it's possible!"[1] Assuming there is no built-in way to detect these changes, I envisage several possible extrinsic solutions: 1. When other clients update the row, inform them it has changed since they read it. 2. Have each client broadcast the table/row ID to all others when they change it. 3. Have the database broadcast the table/row ID top all clients when it changes. The last two then involve interested clients fetching the current version of the row if necessary. It all seems rather messy, but this is not an uncommon problem, so what do I do? [1] It's not official work, so I'm allowed to do that. The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

    M 1 Reply Last reply
    0
    • P ProffK

      I've just been posed a challenge: to update a DataGrid on one client when another client changes the source table for that grid on a central database, all three connected on a standard TCP/IP network. Now I vaguely (probably incorrectly) remember something about earlier versions of ADO being able to detect changes in source data, but I may be senile already, so I said, "Yes, it's possible!"[1] Assuming there is no built-in way to detect these changes, I envisage several possible extrinsic solutions: 1. When other clients update the row, inform them it has changed since they read it. 2. Have each client broadcast the table/row ID to all others when they change it. 3. Have the database broadcast the table/row ID top all clients when it changes. The last two then involve interested clients fetching the current version of the row if necessary. It all seems rather messy, but this is not an uncommon problem, so what do I do? [1] It's not official work, so I'm allowed to do that. The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

      M Offline
      M Offline
      Michael Potter
      wrote on last edited by
      #2

      The solution depends upon how close you need to keep the synchronization. If 5-10 seconds is fine, you can just keep a TimeStamp on the rows. Every so often, send the client to request any rows that exceed it latest TimeStamp. It will usually return zero records and nothing needs to be done. This does require that rows be marked for deletion instead of physically deleted immediately. The other solution I have used is to create a service and all clients access the data through it. It is then easy to send update notices down the socket to each client. I try to avoid this solution since it will complicate future maintenance.

      P 1 Reply Last reply
      0
      • M Michael Potter

        The solution depends upon how close you need to keep the synchronization. If 5-10 seconds is fine, you can just keep a TimeStamp on the rows. Every so often, send the client to request any rows that exceed it latest TimeStamp. It will usually return zero records and nothing needs to be done. This does require that rows be marked for deletion instead of physically deleted immediately. The other solution I have used is to create a service and all clients access the data through it. It is then easy to send update notices down the socket to each client. I try to avoid this solution since it will complicate future maintenance.

        P Offline
        P Offline
        ProffK
        wrote on last edited by
        #3

        Michael Potter wrote:

        The other solution I have used is to create a service and all clients access the data through it. It is then easy to send update notices down the socket to each client. I try to avoid this solution since it will complicate future maintenance.

        Never mind complicating current development. Thanks, I think I'll look into the first solution. I suppose I could get a separate DataSet of changed rows and merge it into the DataSet behind the display, no? The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

        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