Record locking quirk?

gamehoist

Member
I'm using DOA3.3 with Delphi5 and Oracle 8.0.4 and what I want is the following:

User1 pulls up a record and puts it in edit mode.

If User2 tries to pull up the same record they can, but when they try to edit the get the message 'Record is locked by another user.'

User1 makes changes and posts the record. Now User2 is able to edit the record.

This works as long as User1 actually makes changes to the record. If User1 calls the OracleDataSet.Edit method and then the OracleDataSet.Post method without making changes, subsequent requests by User2 continue to get the 'Record is locked by another user' message. Has anyone else ran in to this problem.

Thanks,
Eric Dye
 
I haven't run into this problem before, but I was able to reproduce it. I had to set the LockingMode property to lmLockImmediate though, so I assume this is the case for you as well?

The problem is caused by a bug that occurs when the dataset notices that nothing has changed, so it doesn't have to execute an update statement. It doesn't execute a commit either, so the lock remains. We will fix this in the next patch release.

The only work around in the current release is an obvious one: set LockingMode to lmCheckImmediate (the default).

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