On-Lock Trigger and Releasing the Lock
I have a data block which has a View as a Datasource.
I want to update some fields from that View so I use On-Lock and On-Update triggers.
In the On-Lock trigger I use a select for update nowait to lock the row.
My problem is that if I don't save the changes the lock is not released.
My problem is reproduced with the Following steps
1. Open two sessions of the form
2. Update field in one session. (The On-Lock trigger is fired)
3. Try to enter query in the Form.
4. The message Do you want to save the Changes? appears.
5. I answer No
6. I go to the second session
7. I try to update the same row and I get an error cause the Row is Locked.
Should I code another trigger? Should I issue a rollback somewhere ?
Thanks in advance.