Bde.DBTables.TDatabase.TransIsolation

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property TransIsolation: TTransIsolation read FTransIsolation write FTransIsolation default tiReadCommitted;

C++

__property TTransIsolation TransIsolation = {read=FTransIsolation, write=FTransIsolation, default=1};

Properties

Type Visibility Source Unit Parent
property published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TDatabase

Description

Specifies the transaction isolation level for transactions managed by the Borland Database Engine (BDE).

Use TransIsolation to specify the transaction isolation level for database transactions managed by the BDE. 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.

Note: Applications that use pass-through SQL for handling transactions must pass a transaction isolation level directly to the database server using the appropriate SQL statement.

TransIsolation can be any one of the three values summarized in the following table:


Isolation level Meaning

tiDirtyRead

Permits reading of uncommitted changes made to the database by other simultaneous transactions. Uncommitted changes are not permanent, and might be rolled back (undone) at any time. At this level, a transaction is least isolated from the effects of other transactions.

tiReadCommitted

Permits reading of committed (permanent) changes made to the database by other simultaneous transactions. This is the default TransIsolation property value.

tiRepeatableRead

Permits a single, one-time reading of the database. The transaction cannot see any subsequent changes made by other simultaneous transactions. This isolation level guarantees that, once a transaction reads a record, its view of that record does not change unless it makes a modification to the record itself. At this level, a transaction is most isolated from other transactions.


Different database servers support different levels of transaction isolation. If an application sets TransIsolation to an unsupported level for a remote SQL server, the BDE uses the next highest level supported by that server. The following table summarizes the isolation levels supported by the servers recognized by the BDE:


Server Specified Level Actual Level

Oracle

tiDirtyRead | tiReadCommitted | tiRepeatableRead

tiReadCommitted | tiReadCommitted | tiRepeatableRead (READONLY)

Sybase, MS-SQL

tiDirtyRead | tiReadCommitted | tiRepeatableRead

tiReadCommitted | tiReadCommitted | Not supported

DB2

tiDirtyRead | tiReadCommitted | tiRepeatableRead

tiDirtyRead | tiReadCommitted | tiRepeatableRead

Informix

tiDirtyRead | tiReadCommitted | tiRepeatableRead

tiDirtyRead | tiReadCommitted | tiRepeatableRead

InterBase

tiDirtyRead | tiReadCommitted | tiRepeatableRead

tiReadCommitted | tiReadCommitted | tiRepeatableRead

Paradox, dBASE, Access, FoxPro

tiDirtyRead | tiReadCommitted | tiRepeatableRead

tiDirtyRead | Not supported | Not supported


Note: For local transactions against Paradox and dBASE, TransIsolation must be set to tiDirtyRead. Otherwise, an exception is raised.

If an application uses ODBC to interface with a server, the ODBC driver must also support the isolation level. For more information about supported isolation levels, see the documentation for the ODBC driver in question.

See Also