Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Access Module for Microsoft SQL Server User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

2.11 Transaction Processing

There are two ways to control transactions through Microsoft SQL Server:

Descriptions of these methods follow.

2.11.1 Setting Isolation Levels

You can use the isolation() method of RWDBConnection to set the isolation level of the connection. Table 5 shows the mapping between the IsolationType argument you pass and the isolation level set on the connection

Table 5: Setting the isolation level

RWDBConnection::IsolationType Microsoft SQL Server Isolation Level
Unknown SQL_TXN_READ_UNCOMMITTED
ANSILevel1 SQL_TXN_READ_UNCOMMITTED
ANSILevel2 SQL_TXN_READ_COMMITTED
ANSILevel3 SQL_TXN_REPEATABLE_READ

To determine the isolation level, call RWDBConnection::isolation() without an argument.

2.11.2 Using Transaction Control Methods

You can explicitly control transactions through the following methods:

These methods are implemented using the following Transact-SQL transaction statements:

An application can add the DB Interface Module transaction methods to its code to take explicit control of its transaction blocks. Transactions may be nested and the -savepoint feature is supported. The -savepoint feature allows a current transaction to be partially rolled back to a marked point.


At the time of this writing, conflicting information was found in the MS SQL Server ODBC driver documentation regarding the use of -Transact-SQL transaction statements. Please see the Microsoft SQL Server readme for more information regarding transaction savepoints.

The example below demonstrates the use of the savepoint feature and the other transaction processing methods of the DB Interface Module.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.