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 Clashes

Data Clashes

Scheduled Pinned Locked Moved Database
databaseannouncementc++visual-studio
4 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.
  • B Offline
    B Offline
    Bram van Kampen
    wrote on last edited by
    #1

    Hi, I am using VS 2012 Free Edition (et al) I am contemplating using this for the next version of 25 year old successfull software. We need to update various tables in a single transaction. This transaction needs to proceed in a step in which either All succeed, or None succeed. (resulting in a roll-back if any step failed) The database must deal with a high likelyhood that several terminals will at the same time try to write to the same entry in the same table. I handled this in MFC, with my own DB by giving each contentious item a serial-number, The first check for a modify-save would be if the serial number was still the same. if not, the item would be refused, and the transaction rolled back. How does SQL handle this. N.B. The word 'Serial Number' seems to link to some add somewhere. Nothing to do with me! Just, Don't click it on my behalf. Thankfully that link has disappeared since. TAKE NOTE IF IT HAPPENS TO YOU. The term 'Serial Number' turned into a link to some mobile phone sellers. Its gone now. :) :)

    Bram van Kampen

    D 1 Reply Last reply
    0
    • B Bram van Kampen

      Hi, I am using VS 2012 Free Edition (et al) I am contemplating using this for the next version of 25 year old successfull software. We need to update various tables in a single transaction. This transaction needs to proceed in a step in which either All succeed, or None succeed. (resulting in a roll-back if any step failed) The database must deal with a high likelyhood that several terminals will at the same time try to write to the same entry in the same table. I handled this in MFC, with my own DB by giving each contentious item a serial-number, The first check for a modify-save would be if the serial number was still the same. if not, the item would be refused, and the transaction rolled back. How does SQL handle this. N.B. The word 'Serial Number' seems to link to some add somewhere. Nothing to do with me! Just, Don't click it on my behalf. Thankfully that link has disappeared since. TAKE NOTE IF IT HAPPENS TO YOU. The term 'Serial Number' turned into a link to some mobile phone sellers. Its gone now. :) :)

      Bram van Kampen

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

      Maybe I don't fully understand the problem, but SQL Server will handle "transactions" the same way. You declare the start of a transaction "Begin Transaction", do your stuff, then either "Commit" or "Rollback" the activity. SQL server can automatically generate "serial" numbers for you. Look into the column data-type known as "Identity Column". Did that answer your question?

      B 1 Reply Last reply
      0
      • D David Mujica

        Maybe I don't fully understand the problem, but SQL Server will handle "transactions" the same way. You declare the start of a transaction "Begin Transaction", do your stuff, then either "Commit" or "Rollback" the activity. SQL server can automatically generate "serial" numbers for you. Look into the column data-type known as "Identity Column". Did that answer your question?

        B Offline
        B Offline
        Bram van Kampen
        wrote on last edited by
        #3

        Thanks, I've since learned about the existence of 'Begin-End Transaction' Can you give me a link to a page explaining what it does and how it works? Regards,# :)

        Bram van Kampen

        D 1 Reply Last reply
        0
        • B Bram van Kampen

          Thanks, I've since learned about the existence of 'Begin-End Transaction' Can you give me a link to a page explaining what it does and how it works? Regards,# :)

          Bram van Kampen

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

          Straight from Microsoft ... http://msdn.microsoft.com/en-us/library/ms188929.aspx[^] http://msdn.microsoft.com/en-us/library/ms186775.aspx[^] Hope things work out for you. :thumbsup:

          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