Setting Isolation Levels
You can use the
isolation() method of
RWDBConnection to set the isolation level of your connection.
Table 5 shows the mapping between the
IsolationType argument you pass, and the isolation level set by the
SQLSetConnectAttr() call.
Table 5 – Setting the isolation level
RWDBConnection:: IsolationType | ODBC Isolation Level | IBM Isolation Level |
---|
Unknown | SQL_TXN_READ_UNCOMMITTED | Uncommitted Read |
ANSILevel1 | SQL_TXN_READ_COMMITTED | Cursor Stability |
ANSILevel2 | SQL_TXN_REPEATABLE_READ | Read Stability |
ANSILevel3 | SQL_TXN_SERIALIZABLE | Repeatable Read |
To determine the current isolation level, call RWDBConnection::isolation() without an argument.