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. Multi-client access: good practice

Multi-client access: good practice

Scheduled Pinned Locked Moved Database
questiondatabaselearning
3 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.
  • G Offline
    G Offline
    goldoche
    wrote on last edited by
    #1

    This is a very subjective beginner question... Suppose I have two different applications that access the same database, and I want them both to use the most recent data... how should I do it? Should I clear and refill my whole dataset every time I access data? Should I use remoting between the two applications in order to notify each other of what row to reload (this seems complicated!)? By the way I work in disconnected mode with Typed datasets. I'd appreciate if you gave me some pointers. Thank you!

    P M 2 Replies Last reply
    0
    • G goldoche

      This is a very subjective beginner question... Suppose I have two different applications that access the same database, and I want them both to use the most recent data... how should I do it? Should I clear and refill my whole dataset every time I access data? Should I use remoting between the two applications in order to notify each other of what row to reload (this seems complicated!)? By the way I work in disconnected mode with Typed datasets. I'd appreciate if you gave me some pointers. Thank you!

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Applications informing each other about changes to data doesn't sound like a good idea. You haven't stated what database system or programming languages you are using. If you are using, SQL Server 2005 and .NET, Query Notification[^] may be of interest to you.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      1 Reply Last reply
      0
      • G goldoche

        This is a very subjective beginner question... Suppose I have two different applications that access the same database, and I want them both to use the most recent data... how should I do it? Should I clear and refill my whole dataset every time I access data? Should I use remoting between the two applications in order to notify each other of what row to reload (this seems complicated!)? By the way I work in disconnected mode with Typed datasets. I'd appreciate if you gave me some pointers. Thank you!

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        goldoche wrote:

        I want them both to use the most recent data

        You can never have the most recent data. As soon as you have retrieved it, it is potentially out of date. That said, you then have to decide how out-of-date you are willing to allow the data to be. You'll have to have some way of dealing with concurrency violation, that is, where another user has modified the data since it was read. One approach, that used by the DataSet's update feature by default (IIRC), is to compare all the field values against the values that were retrieved and if different, to fail the update.

        DoEvents: Generating unexpected recursion since 1991

        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