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. Concurrency

Concurrency

Scheduled Pinned Locked Moved Database
csharpquestiondatabasehelpannouncement
4 Posts 3 Posters 1 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.
  • I Offline
    I Offline
    IamADotNetGuy
    wrote on last edited by
    #1

    Hi Please dont get upset if u see this message in two places, As it is bit urgent i have posted at two place one is at c# forums and another is at this place How can i handle concurrency in DotNet? I need to update a record into a database table, by the time I will access the record there is a chance that somebody can change the record. I know this kind of problem is common. But never i had an oppurtunity to work this kind of problem. please let me know the solution.

    R G 2 Replies Last reply
    0
    • I IamADotNetGuy

      Hi Please dont get upset if u see this message in two places, As it is bit urgent i have posted at two place one is at c# forums and another is at this place How can i handle concurrency in DotNet? I need to update a record into a database table, by the time I will access the record there is a chance that somebody can change the record. I know this kind of problem is common. But never i had an oppurtunity to work this kind of problem. please let me know the solution.

      R Offline
      R Offline
      Rein Hillmann
      wrote on last edited by
      #2

      Do a search in SQL Books Online for "transactions". More specifically: begin transaction commit transaction and rollback transaction

      1 Reply Last reply
      0
      • I IamADotNetGuy

        Hi Please dont get upset if u see this message in two places, As it is bit urgent i have posted at two place one is at c# forums and another is at this place How can i handle concurrency in DotNet? I need to update a record into a database table, by the time I will access the record there is a chance that somebody can change the record. I know this kind of problem is common. But never i had an oppurtunity to work this kind of problem. please let me know the solution.

        G Offline
        G Offline
        Grimolfr
        wrote on last edited by
        #3

        Also, assuming that you're using SQL Server 2000 (or MSDE) have a look at: sp_getapplock sp_releaseapplock In most of the situations where our OLTP system has concurrency issues, I've found app locks to be infinitely more useful than transactions. Transactions (IMHO) should be used for atomicity, not for concurrency issues.


        Grim

        (aka Toby)

        MCDBA, MCSD, MCP+SB

        Need a Second Life?[^]

        I 1 Reply Last reply
        0
        • G Grimolfr

          Also, assuming that you're using SQL Server 2000 (or MSDE) have a look at: sp_getapplock sp_releaseapplock In most of the situations where our OLTP system has concurrency issues, I've found app locks to be infinitely more useful than transactions. Transactions (IMHO) should be used for atomicity, not for concurrency issues.


          Grim

          (aka Toby)

          MCDBA, MCSD, MCP+SB

          Need a Second Life?[^]

          I Offline
          I Offline
          IamADotNetGuy
          wrote on last edited by
          #4

          This will work..... But i am using Oracle and also i want to handle this at BLL but not in database.

          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