RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOConnection.IsolationLevel Property

Specifies the transaction isolation level for transactions.

Pascal
property IsolationLevel: TIsolationLevel;
C++
__property TIsolationLevel IsolationLevel;

Use IsolationLevel to specify the transaction isolation level for a connection. The transaction isolation level determines how a transaction interacts with other simultaneous transactions when they work with the same tables, and how much a transaction sees of the work performed by other transactions. The default value for IsolationLevel is ilCursorStability. 

Set IsolationLevel to a valid TIsolationLevel value prior to starting a new transaction. Read IsolationLevel after the transaction has been activated to determine the actual transaction isolation level used. It is possible that a server will force an isolation level other than that requested if the level requested is not supported. 

Below are four of the supported transaction levels and the transaction phenomena that may occur under each. For more information on all supported transaction levels, see the topic for the TIsolationLevel type.

Isolation Level 
Dirty Reads 
Nonrepeatable Reads 
Phantoms 

Dirty reads occur when a transaction reads data that has not yet been committed. Nonrepeatable reads occur when a transaction reads the same row twice and the data is different each time. Phantoms are rows that match the criteria used to compose a result set, but that are not initially visible. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!