.net - Allow only one updater to customer in SQL Server 2008 -
.net - Allow only one updater to customer in SQL Server 2008 -
i've done searching, haven't found reply sense must mutual situation, , should have "best practice" pattern solution:
i have application written in .net 4 (c#) sql server 2008 end. have finish control, , there no outside processes or applications worry about.
essentially, want following:
allow see customers , orders (returned main search form).
as user adds new order or picks order @ or edit, lock placed on entire customer. other users able "read-only" client , orders.
when user exits order, lock removed (by exiting screen or logging out of app). also, , may hard part, lock removed if user crashes (perhaps locks have finite time ensure this?).
i saw application locks, , transactions, don't know use, each seem have problems.
so best practice locking customer, , way other users know client locked user?
a manually way adding 2 columns in table: boolean locked , datetime last_locked, , update when user lock , release when unlocked (update last_locked periodically), set expiration limit in application, 10 minutes, , if registry locked more 10 minutes, unlock then.
.net sql-server-2008
Comments
Post a Comment