Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Changing isolation level? ++ scenarios

Re: Changing isolation level? ++ scenarios

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 5 Dec 2003 10:54:41 -0500
Message-ID: <sMadnQ--2cApN02iRVn-iQ@comcast.com>


:)
| :)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.

Received on Fri Dec 05 2003 - 09:54:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US