Skip to main content
All docs
V24.1

SqlQuery.IsolationLevel Property

Specifies the isolation level for SqlQuery.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v24.1.dll

NuGet Packages: DevExpress.DataAccess, DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap

Declaration

[LocalizableCategory(DataAccessStringId.QueryPropertyGridCommonCategoryName)]
public SqlIsolationLevel IsolationLevel { get; set; }

Property Value

Type Description
SqlIsolationLevel

The isolation level.

Available values:

Name Description
None

The default isolation level of the database management system is used.

ReadUncommitted

A transaction retrieves data that has been modified but not committed by other transactions.

ReadCommitted

Transaction statements cannot read data that has been modified but not committed by other transactions.

RepeatableRead

Transaction statements cannot read data that has been modified but not yet committed by other transactions. Other transactions cannot modify data that has been read by the current transaction until the current transaction is completed.

Serializable

A transaction retrieves exactly the same data every time it repeats a read operation.

Snapshot

Specifies that data read by any statement in a transaction will be the transactionally consistent version of data that existed at the start of the transaction.

Remarks

You can change the isolation level for a specific query to allow the user to read data from tables by ignoring locks and therefore not being blocked by other processes. This can significantly reduce the query time.

Use the ConnectionOptions.IsolationLevel property to set the isolation level for all queries, stored procedures, and other operations executed for the specified connection.

SqlQuery.IsolationLevel has priority over ConnectionOptions.IsolationLevel.

See Also