MIDRANGE dot COM Mailing List Archive



Home » JAVA400-L » October 2005

Re: Locking records in DB2



fixed

Ron,

You might consider an optimistic update.  Read the record for display but
don't lock it.  When the update occurs you check that the fields you are
updating on the record haven't changed since the original read (by using the
old values as well as a key in the update's selection clause).  If the
record hasn't changed the update occurs.  If there has been a change the
update will fail.  When it fails you read the record for display again with
an error message and allow the user to attempt to change the record again.

Paul






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact