Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Locking a table row while web form is open

by astroboy (Chaplain)
on Dec 23, 2005 at 19:13 UTC ( #518811=note: print w/replies, xml ) Need Help??

in reply to Locking a table row while web form is open

Optimistic locking may work for your application, but for some apps it's not an acceptable solution:

  • When the user queries a row for editing generate a hash of said row
  • When the user requests that the row is saved, regenerate the hash of the existing row. If it matches the original hash, then complete the save - otherwise let the user now that the row was changed by someone else

The problem that I've encountered with locking web apps, is that rows get checked out/locked, and then the user gets distracted, called into a meeting etc and they never remember to unlock the record. Optimistic locking solves this problem, but it may not suit your business rules

  • Comment on Re: Locking a table row while web form is open

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://518811]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2020-01-29 13:08 GMT
Find Nodes?
    Voting Booth?