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. Updater for multi-user program

Updater for multi-user program

Scheduled Pinned Locked Moved Visual Basic
databasehelptutorialannouncement
5 Posts 3 Posters 2 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.
  • M Offline
    M Offline
    Member_14870213
    wrote on last edited by
    #1

    Hi I have created a program that is intended to be used by multiple users (each on their own computer) who access the same SQL database. I have also created a separate updater program to sit alongside the main application. However, I am unsure how to check if there are any users in the main program before the update is run. (This is easy to do on a single user application but not sure on multi-user). Any help is greatly appreciated (I am relatively green here so please be kind)

    M D 2 Replies Last reply
    0
    • M Member_14870213

      Hi I have created a program that is intended to be used by multiple users (each on their own computer) who access the same SQL database. I have also created a separate updater program to sit alongside the main application. However, I am unsure how to check if there are any users in the main program before the update is run. (This is easy to do on a single user application but not sure on multi-user). Any help is greatly appreciated (I am relatively green here so please be kind)

      M Offline
      M Offline
      Maciej Los
      wrote on last edited by
      #2

      If you want to update only client application, the number of users connected to the database is not important. Does updater have to update database too?

      M 1 Reply Last reply
      0
      • M Maciej Los

        If you want to update only client application, the number of users connected to the database is not important. Does updater have to update database too?

        M Offline
        M Offline
        Member_14870213
        wrote on last edited by
        #3

        No. The client will be updating the database. It is more an issue of ensuring no users are in the program while the update is running. If this was a single user prograM then it is easy to check and force a close. I am not sure when there is more than one user (from different computers)

        M 1 Reply Last reply
        0
        • M Member_14870213

          No. The client will be updating the database. It is more an issue of ensuring no users are in the program while the update is running. If this was a single user prograM then it is easy to check and force a close. I am not sure when there is more than one user (from different computers)

          M Offline
          M Offline
          Maciej Los
          wrote on last edited by
          #4

          Sorry, but you wrote that every client application is opened on client machine. You don't have to care about other clients. So, if a single instance of client application is running on client machine, you can close it via updater. You don't even need to write custom updater. See: [How to: Specify the Location Where End Users Will Install From - Visual Studio | Microsoft Docs](https://docs.microsoft.com/en-us/visualstudio/deployment/how-to-specify-the-location-where-end-users-will-install-from?view=vs-2019) Here is interesting alternative: [Simple Auto-Update: Let your application update itself using 2 lines of code](https://www.codeproject.com/Articles/731954/Simple-Auto-Update-Let-your-application-update-i)

          1 Reply Last reply
          0
          • M Member_14870213

            Hi I have created a program that is intended to be used by multiple users (each on their own computer) who access the same SQL database. I have also created a separate updater program to sit alongside the main application. However, I am unsure how to check if there are any users in the main program before the update is run. (This is easy to do on a single user application but not sure on multi-user). Any help is greatly appreciated (I am relatively green here so please be kind)

            D Offline
            D Offline
            David Mujica
            wrote on last edited by
            #5

            I think what you need to research is the topic of concurrency. One way to implement this is to have a Modify Date on the primary record. 1) Read the table entry along with the modify date/time. 2) When updating the database, compare the original date/time with the value currently stored, if the date/time has not been changed, then it is OK to perform your update. (Rollback) During your update you would set the modify date/time to the current date/time. (GetDate() ) Something like that.

            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