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. Dataset question

Dataset question

Scheduled Pinned Locked Moved Database
questiondatabasehelpworkspace
2 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.
  • T Offline
    T Offline
    Timothy_1982
    wrote on last edited by
    #1

    Hello, I'm programming an application for a multi user environment, so multiple users will work with different applications on the same database tables. Now, here's my problem. Lets say user A en user B start the application, and there local dataset is filled. Let's say user A changes row 1, automatically the application will save this in the application and in the database. But now user B doesn't have this latest info yet. How do i solve this? Nowadays it's working like this, each minute the application is getting the latest info from the database, and the datagrid is redrawn with the new latest info. but i would like to compare the current dataset for changes with the new dataset from the database. Is there an easy way to do this? thx

    C 1 Reply Last reply
    0
    • T Timothy_1982

      Hello, I'm programming an application for a multi user environment, so multiple users will work with different applications on the same database tables. Now, here's my problem. Lets say user A en user B start the application, and there local dataset is filled. Let's say user A changes row 1, automatically the application will save this in the application and in the database. But now user B doesn't have this latest info yet. How do i solve this? Nowadays it's working like this, each minute the application is getting the latest info from the database, and the datagrid is redrawn with the new latest info. but i would like to compare the current dataset for changes with the new dataset from the database. Is there an easy way to do this? thx

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      There's nothing you can do about what is shown on one clients screen while another is changing it, unless you lock records so only one person can have them at a time. I'd lock only when you get to a point of editing, and then users will find out someone beat them to it if they try to edit something that someone else has grabbed. The 1 minute refresh is basically a race condition, and a drain on your database server resources. Christian Graus - Microsoft MVP - C++

      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