Oracle Isolation Level and ADO



Hi,

I have some COMs developed in Visual Basic. These COMs access to an
Oracle DB with ADO. it isn't set the Isolation level of the transaction
on the ADO Connection and i think that ADO use the default Level "Read
Committed".

This is the pseudo-code:

***********************************
BEGIN TRANSACTION

<<LOCK table1 exclusive mode>>

idNew=SELECT MAX(TABLE1.id)+1 FROM TABLE1
Insert into TABLE1 (ID) values (idNew)
.....
COMMIT
or
ROLLBACK

***********************************

Then the explicit LOCK grants that two invocations of this code don't
read MAX value two times.

Is the explicit LOCK useless in this code?

I know that all the Isolation Levels do strict 2PL on write locks. The
isolation level impact only on read locks.

What is the right Isolation Level?

I think that "Serializable" should be equvalent to the explicit LOCK on
the tables.

Bye

Ken

.



Relevant Pages

  • Re: Oracle Isolation Level and ADO
    ... These COMs access to an ... > Oracle DB with ADO. ... > Is the explicit LOCK useless in this code? ... > isolation level impact only on read locks. ...
    (comp.databases)
  • Re: IsolationLevel workaround?
    ... In the end I opted not to use the ADO transaction methods (i.e. ... This allows me to use the SNAPSHOT isolation level. ... Is there any way to get ADO to use the SNAPSHOT isolation level? ...
    (microsoft.public.data.ado)
  • Re: Oracle Isolation Level and ADO
    ... >> Oracle DB with ADO. ... > object to specify an isolation level, ... > so it is similar to EXCLUSIVE locking. ...
    (comp.databases)
  • IsolationLevel workaround?
    ... I would like to use the SQL 2005 SNAPSHOT isolation level. ... that the ADO IsolationLevelEnum has not been updated for SQL 2005. ... ReadCommitted whenever I begin a transaction. ... Is there any way to get ADO to use the SNAPSHOT isolation level? ...
    (microsoft.public.data.ado)
  • Re: IsolationLevel workaround?
    ... cn.Execute('SET TRANSACTION ISOLATION LEVEL SNAPSHOT'); ... ADO is kind enough to set the isolation method back to ... ReadCommitted whenever I begin a transaction. ...
    (microsoft.public.data.ado)