views:

94

answers:

2

Hi, I am building a web app in Silverlight which allows users to view and edit a database. In order to prevent multiple users from editing the same data, I was thinking of implementing a lock and key mechanism, so that other users are made to wait when one particular user is editing the data. Is there any way in which we can have variable(flag specifying if a user is editing data) in the server which can be shared across multiple clients? Is there a better way to manage this type of conurrent data access issues?

+1  A: 

You might want to read about optimistic and pessimistic locking. For your scenario I'd go with optimistic locking, as a first try.

leonbloy
+1  A: 

oracle has a SELECT FOR UPDATE syntax for pessimistic locking

Randy