TOracleDataset.Cancel doesn't unlock table row

storm

Member
Oracle 8.0.4, DOA 3.4.5 and Delphi 5.

In my application I use TOracleDataset with CachedUpdates and locking mode set to lmLockImmediate. On 1st client machine user cancel updates on the table row (Cancel method from TOracleDataset is used in code). The 2nd user on another client wants to edit the same table row but he can't because the row is still locked by 1st user. I tried to update table using SQL Plus but Oracle waits because row is locked. Using TNavigator's or TOracleNavigator's Cancel button gives the same results.
Only when TOracleSesion.CancelUpdates is used the row lock is released.
Is it bug in DOA or I'm doing something wrong?

Thanks,
Ivica
 
I think you could call this a conceptual problem. With CachedUpdates = True and LockingMode = lmLockImmediate, a Cancel does not lead to a Rollback (which would unlock the record, but would also unlock all other records and undo all other changes). The lock stays a part of the transaction until it is committed or rolled back. This is what happens when you use CancelUpdates.

------------------
Marco Kalter
Allround Automations
 
Back
Top