Data.Win.ADODB.TADOConnection.IsolationLevel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property IsolationLevel: TIsolationLevel read GetIsolationLevel write SetIsolationLevel default ilCursorStability;

C++

__property TIsolationLevel IsolationLevel = {read=GetIsolationLevel, write=SetIsolationLevel, default=4};

Properties

Type Visibility Source Unit Parent
property published
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TADOConnection

Description

Specifies the transaction isolation level for transactions.

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
Read uncommitted Yes Yes Yes
Read commited No Yes Yes
Repeatable read No No Yes
Serializable No No No



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.

See Also