Will Leshner wrote:
On Apr 6, 2005 10:43 AM, Will Leshner <[EMAIL PROTECTED]> wrote:
After thinking about this a bit more, I realized that writing a
trigger that didn't trigger for the locker is pretty simple. So I'm
thinking that triggers would work in this situation, but I'm wondering
if anybody has ever done anything like this before.


I know your pain :) . Finer grain locking would be great.

The only problem I see is that you'd have to call
that trigger on every write. To at least check for
a lock.  Would that be an acceptable performance
hit for you?

Another solution, if it suits your environment would
be to create a 'record' object or struct and give
each object a mutex.  If you maintain that that
object is the only way to modify a row and that your
application keeps track of all objects ( as to not
create multiples on the same row ) then that would
effectively lock the record.  Should be faster to
since you don't have to hit the database to find
out the row state.

Good luck,
Kervin




Reply via email to