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. General Programming
  3. Visual Basic
  4. Datagridview edited by Multiple users

Datagridview edited by Multiple users

Scheduled Pinned Locked Moved Visual Basic
helptutorial
5 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
    helelark123
    wrote on last edited by
    #1

    Hello, I am developing with VS2005 (VB) I wrote a program that is used by mulitple users at the same time. It contains a datagridview and when a user is editing a spcific record I would like that the data will be refreshed autoatically in all the users screen. I don't want to use timer or flags for refreshing the data but a property like "resync" for example that exists in ADODB.recordset Is ther e any solution Please help Thank you

    Shay Noy

    A M 2 Replies Last reply
    0
    • H helelark123

      Hello, I am developing with VS2005 (VB) I wrote a program that is used by mulitple users at the same time. It contains a datagridview and when a user is editing a spcific record I would like that the data will be refreshed autoatically in all the users screen. I don't want to use timer or flags for refreshing the data but a property like "resync" for example that exists in ADODB.recordset Is ther e any solution Please help Thank you

      Shay Noy

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      If you are using SQL Server 2005/2008 take a look at Notification service , but be warned if you have a lot of users there is a substantial overhead.

      Bob Ashfield Consultants Ltd

      1 Reply Last reply
      0
      • H helelark123

        Hello, I am developing with VS2005 (VB) I wrote a program that is used by mulitple users at the same time. It contains a datagridview and when a user is editing a spcific record I would like that the data will be refreshed autoatically in all the users screen. I don't want to use timer or flags for refreshing the data but a property like "resync" for example that exists in ADODB.recordset Is ther e any solution Please help Thank you

        Shay Noy

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        this is a typical nightmare some developers get into sooner or later. There is no elegant solution to this. Notification services will do the job but the overhead in both system and support is horrible. Some solutions: Timer as you have surmised it the standard solution. Do not allow inline editing - force the user to a dialog for CRUD and reload the grid when they return (I use this) Test the record BEFORE allowing inline editing and warn the user. Reload the grid when the record is saved.

        Never underestimate the power of human stupidity RAH

        H 1 Reply Last reply
        0
        • M Mycroft Holmes

          this is a typical nightmare some developers get into sooner or later. There is no elegant solution to this. Notification services will do the job but the overhead in both system and support is horrible. Some solutions: Timer as you have surmised it the standard solution. Do not allow inline editing - force the user to a dialog for CRUD and reload the grid when they return (I use this) Test the record BEFORE allowing inline editing and warn the user. Reload the grid when the record is saved.

          Never underestimate the power of human stupidity RAH

          H Offline
          H Offline
          helelark123
          wrote on last edited by
          #4

          Thank you for your reply, If multiple users open dialog for updating the same record, is there a way to lock the record when the first of them is starting the update?

          Shay Noy

          M 1 Reply Last reply
          0
          • H helelark123

            Thank you for your reply, If multiple users open dialog for updating the same record, is there a way to lock the record when the first of them is starting the update?

            Shay Noy

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            Of course but you are not going to like it. Be VERY sure this is a real world issue and not some BA's fantasy. Most developers percieve this as an issue early in their careers and find out it almost never actually happens. I usually don't display ALL the information for a record in the grid so when the dialog goes to get the data to fill all the details it gets/sets as locked flag. If the record returned is locked then don't display the save button. There are HUGE arguments on the best way to implement this, issues such as invalid flags, how to flag time/user/both, how to clear flags. Having said that I have NEVER had to implement this type (or any) of record locking scheme. It has always been an architect who proposes it then the business looks at the likelyhood of data corruption and the cost and hassle of implementing it and chucks it out.

            Never underestimate the power of human stupidity RAH

            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