Re: Locking (was Globals in 4gl - feature or bug?)
Posted in 1996
Nils.Myklebust@ccmail.telemax.no wrote: >We had applications that under SE would do lock in share mode >and noone else could lock the same table. We used this to make sure only >one user did critical updates to some tables. That still works in a way. Noone >can update the table if it is locked in share mode. >The problem under OnLine 7 however is that any number of users (or applications >realy) can execute the lock statement with share mode. It isn't until an actual >update is attemted that the we find out someone else has a lock on the table. I was extremely baffled when I discovered this. It seemed to me that a lock in share mode was absolutely useless. >We can't lock in exclusive mode because we do want others to be able to read >from the table while we do the updates. We only use exclusive locking of tables. If it is imperative that another process does not have it's reads blocked, we switch isolation level to dirty read briefly, while we do the read. Hope this helps. Cheers, Brent Jackson. brent@hypercom.co.nz Phone : 64-9-3603593 Fax : 64-9-3602840