Re: Online activity
Paul Cowan <[email protected]> Sun, 11 Oct 2009 12:44:21 +0100
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
Hi Marcus, I am using NHibernate and I am already using the Versioning support in there. This still needs the user to press the save button and potentially get all the way to the end of adding all the detail to find out that it has been altered by another user. I think what i am looking for is the ability to tell the user sooner rather than later that the record is being worked on by somebody else. Cheers Paul Cowan Cutting-Edge Solutions (Scotland) http://thesoftwaresimpleton.blogspot.com/ 2009/10/11 Markus Zywitza <[email protected]> > Use optimistic locking. The best bet is using a version column, that holds > either a DateTime or an integer counter. In the update compare the current > version with the version that has been read when displaying the record to > the user. It is then important to check whether the update really changed > the record by inspecting the record count. > NHibernate does the same with it's optimistic locking. You can look into > NHibernate's documentation and source code for a more in-depth explanation > of the optimistic locking with version columns. > > -Markus > > 2009/10/11 Paul Cowan <[email protected]> > > > Hi, > > > > I am working on an application where different users will process > different > > database records off a web page. > > > > They will select different records from a grid on a web page and then > > complete the details before saving. > > > > My question resolves around how I can stop 2 different users accessing > the > > same record at the same time. > > > > I could have a flag in place that signifies that the record is being > worked > > on but there are edge cases surrounding this approach. > > > > My worry is that a user might start processing a record and then for > > whatever reason just finish the browser session without actually > finishing > > the record and the flag will remain as being processed. > > > > I am sure this is quite a common use case. Any ideas? > > > > Cheers > > > > Paul Cowan > > > > Cutting-Edge Solutions (Scotland) > > > > http://thesoftwaresimpleton.blogspot.com/ > > > > =================================== > > View archives and manage your subscription(s) at > > http://peach.ease.lsoft.com/archives > > > > =================================== > View archives and manage your subscription(s) at > http://peach.ease.lsoft.com/archives > =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives