|
void
setIsolationLevel(SAIsolationLevel_t eIsolationLevel
);
throw (SAException);
Sets the transaction isolation level.
Parameters
eIsolationLevel. One of the
following values from SAIsolationLevel_t enum:
- SA_ReadUncommitted Read
uncommitted.
- SA_ReadCommitted Read
committed.
- SA_RepeatableRead
Repeatable read.
- SA_Serializable
Serializable.
Remarks
Sets the transaction isolation level.
SQL-92 defines four isolation levels, all of which are
supported by SQLAPI++:
- Read uncommitted (the lowest level where transactions are
isolated just enough to ensure that physically corrupt data is not
read)
- Read committed
- Repeatable read
- Serializable (the highest level, where transactions are
completely isolated from one another)
See Server specific notes for information
about how SQLAPI++ maps different isolation levels on a specified DBMS.
Note that if you change isolation level it causes implicit
commit for this connection.
Server specific notes
|
Oracle
|
SA_ReadUncommitted = 'READ COMMITTED'
SA_ReadCommitted = 'READ COMMITTED'
SA_RepeatableRead = 'SERIALIZABLE'
SA_Serializable = 'SERIALIZABLE'
|
|
SQL Server (OLE DB)
|
SA_ReadUncommitted =
ISOLATIONLEVEL_READUNCOMMITTED ('Read Uncommitted')
SA_ReadCommitted =
ISOLATIONLEVEL_READCOMMITTED ('Read Committed')
SA_RepeatableRead =
ISOLATIONLEVEL_REPEATABLEREAD ('Repeatable Read')
SA_Serializable =
ISOLATIONLEVEL_SERIALIZABLE ('Serializable')
|
|
SQL Server
(DB-Library)
|
SA_ReadUncommitted = 'READ UNCOMMITTED'
SA_ReadCommitted = 'READ COMMITTED'
SA_RepeatableRead = 'REPEATABLE READ'
SA_Serializable = 'SERIALIZABLE'
|
|
Sybase
|
SA_ReadUncommitted = CS_OPT_LEVEL0
('read uncommitted')
SA_ReadCommitted = CS_OPT_LEVEL1 ('read
committed')
SA_RepeatableRead = CS_OPT_LEVEL2
('repeatable read')
SA_Serializable = CS_OPT_LEVEL3
('serializable')
|
|
DB2
|
SA_ReadUncommitted =
SQL_TXN_READ_UNCOMMITTED ('Uncommited Read')
SA_ReadCommitted = SQL_TXN_READ_COMMITTED
('Cursor Stability')
SA_RepeatableRead =
SQL_TXN_REPEATABLE_READ ('Repeatable Read')
SA_Serializable = SQL_TXN_SERIALIZABLE
('Read Stability')
|
|
Informix
|
SA_ReadUncommitted =
SQL_TXN_READ_UNCOMMITTED
SA_ReadCommitted = SQL_TXN_READ_COMMITTED
SA_RepeatableRead = SQL_TXN_REPEATABLE_READ
SA_Serializable = SQL_TXN_SERIALIZABLE
|
|
InterBase
|
SA_ReadUncommitted =
isc_tpb_read_committed, isc_tpb_rec_version
SA_ReadCommitted = isc_tpb_read_committed,
isc_tpb_no_rec_version
SA_RepeatableRead = isc_tpb_consistency
SA_Serializable = isc_tpb_concurrency
|
|
SQLBase
|
SA_ReadUncommitted = SQLILRL ('RL')
SA_ReadCommitted = SQLILCS ('CS')
SA_RepeatableRead = SQLILRR ('RR')
SA_Serializable = SQLILRO ('RO')
|
|
MySQL
|
SA_ReadUncommitted = 'READ UNCOMMITTED'
SA_ReadCommitted = 'READ COMMITTED'
SA_RepeatableRead = 'REPEATABLE READ'
SA_Serializable = 'SERIALIZABLE'
|
|
PostgreSQL
|
SA_ReadUncommitted = 'READ COMMITTED'
SA_ReadCommitted = 'READ COMMITTED'
SA_RepeatableRead = 'READ COMMITTED'
SA_Serializable = 'SERIALIZABLE'
|
|
ODBC
|
SA_ReadUncommitted =
SQL_TXN_READ_UNCOMMITTED
SA_ReadCommitted = SQL_TXN_READ_COMMITTED
SA_RepeatableRead = SQL_TXN_REPEATABLE_READ
SA_Serializable = SQL_TXN_SERIALIZABLE
|
See also
IsolationLevel
Error handling
Problems and Questions
If you haven't found the answer to your questions or have
some problems on using the Library, please, send e-mail to howto@sqlapi.com.
|