Multiuser applications

You do not lock entire tables but rather individual records/rows. You can have pessimistic locking or optimistic locking. With pessimistic locking, a lock is performed when the user starts editing a record and released after the record has been posted. This has the advantage that the user never wastes any time editing a record that has been deleted or modified by another user. This is the method used by most desktop databases. With optimistic locking, the record is locked right before changes are posted and released right after the post. This has the advantage of keeping locks active only as long as really needed. This is the default mode of most client/server databases and most developers would consider it the better option in most cases.

As a Direct Oracle Access user, the TOracleDataSet.LockingMode will control the locking strategy. lmLockImmediate is pessimistic locking, while lmCheckImmediate and ImLockDelayed provide optimistic locking. The lmCheckImmediate mode is the default and the one I always use personnaly.

Stephan Patterson
 
Back
Top