Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Changing isolation level? ++ scenarios
:)
| :)Oracle forms handles this by forcing you to re-query data if the data
| :)has changed before you can perform DML. go to www.fatcity.com and sign
| :)up for the DEV2K listserv. Ask them how Oracle wrote the code to do
| :)that. Im not sure.
|
| We tried the same solution. After successful SELECT, it will try to
| re-query before performing DML, and that seems to have solved this
problem.
|
|
forms issues a SELECT FOR UPDATE NOWAIT when the user first attempts to change the record -- well before issuing the UPDATE or DELETE
this gets a lock on the record
forms also compares the database data values to the values originally retrieved from the database -- i don't remember if it does this in its own code or constructs the SQL statement to do the comparison (which would entail an all-inclusive WHERE clause)
if this is the type of functionality you need, i would suggest you store some sort of transaction id in each row (a simple timestamp with milliseconds will do, or an incrementing row version number) to easily check if the re-retrieved row has been updated since first read.
![]() |
![]() |