On Sun, Mar 9, 2008 at 10:04 PM, Sytze de Boer <[EMAIL PROTECTED]> wrote:
>
>  Scenario:
>  ONE user is editing a stock record in a form, and goes to lunch
>  ANOTHER user is doing something else and his module issues a command like
>  REPLACE ALL something
>  It hits the 1st user stock item who has a record lock on the item that's
>  being edited
>
>  How do you guys overcome this kind of issue ?
>

Don't let people go to lunch? ;)

Seriously, allow users to edit a buffered view of the record, and not
leave a lock on a file.

When it's time to update, wrap all updates in transactions. Do a
tableupdate with all fields. If any field has been changed, the
tableupdate fails, you need to handle that, let the user know the
underlying data has changed. Depending on the complexity of the
application, you may want to give the the ability to review what was
changed and choose to override or ignore. In most cases, you just
reload data from the disk and ask them to re-enter their changes.

In most situations, two people shouldn't need to make changes to the
same record at the same time. If you let them hang on to a record lock
over lunchtime, obviously you're increasing that chance. Now,
everyone's application has its own needs, so perhaps there's another
technique that you'll need.

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to