ADO IsolationLevel Property

Definition and Usage

The IsolationLevel property can set or return the isolation level of the Connection object. The value is a IsolationLevelEnum Value. The default is adXactChaos.

Note:The IsolationLevel setting takes effect until the next call to the BeginTrans method.

Syntax

objconn.IsolationLevel

Instance

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.IsolationLevel=adXactIsolated
conn.Open(Server.Mappath("northwind.mdb"))
response.write(conn.IsolationLevel)
conn.Close
%> 

IsolationLevelEnum

Constant Value Description
adXactUnspecified -1 Unable to use the specified isolation level because the provider is using a different isolation level, which cannot be determined.
adXactChaos 16 Cannot override higher-level transactions.
adXactBrowse 256 Can see the uncommitted changes made in other transactions.
adXactReadUncommitted 256 Same as adXactBrowse.
adXactCursorStability 4096 Can only see the changes committed in other transactions.
adXactReadCommitted 4096 Same as adXactCursorStability.
adXactRepeatableRead 65536 Cannot see the changes made in other transactions from within a transaction, but re-querying can retrieve the new Recordset object.
adXactIsolated 1048576 The transaction executes in isolation from other transactions.
adXactSerializable 1048576 Same as adXactIsolated.