FIX: The OdbcConnection object does not report an error when you specify a transaction isolation level that is not supported by the data source in the .NET Framework 2.0 (917752)
The information in this article applies to:
- Microsoft .NET Framework 2.0
SYMPTOMSConsider the following scenario. You use the Microsoft .NET Framework
Data Provider for ODBC in the .NET Framework 2.0 to connect to a data
source in your application. You then use the BeginTransaction method of the
OdbcConnection object to start a transaction. You specify a transaction
isolation level that is not supported by the data source for the transaction. In this scenario,
the OdbcException exception does not occur as expected. However, the exception
occurs as expected when you use the .NET Framework 1.1.CAUSEThis problem occurs because the BeginTransaction method does
not report the ODBC error (SQL_ERROR) that the SQLSetConnectAttr
function returns. Autocommit mode is the default transaction management mode for the
.NET Framework Data Provider for ODBC. The data provider only turns off
Autocommit mode when the transaction isolation level is set correctly.
Therefore, if you specify an incorrect transaction isolation level, the
transaction does not work. If you call the Commit method or the Rollback method, they
are invalid. The Commit method and
the Rollback method do not report the ODBC error (SQL_ERROR).
RESOLUTIONA supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next NET Framework 2.0 Service Pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. PrerequisitesTo apply this hotfix, you must have the Microsoft support files that are described in the following Microsoft Knowledge Base article installed on your computer: 916002 FIX: Error message when you try to use the SqlClient class in an ADO.NET 2.0-based application to connect to an instance of SQL Server 2005: "New request is not allowed to start because it should come with valid transaction descriptor"
Restart requirementYou do not have to restart the computer after you apply this hotfix. Registry informationYou do not have to change the registry. Hotfix file informationThis hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain all of the files that you must have to fully update a product to the latest build.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. .NET Framework 2.0 32-bit version|
Mscordacwks.dll | 2.0.50727.158 | 800,768 | 24-May-2006 | 14:59 | x86 | Mscorlib.dll | 2.0.50727.158 | 4,317,184 | 24-May-2006 | 14:59 | x86 | Mscorwks.dll | 2.0.50727.158 | 5,623,296 | 24-May-2006 | 14:59 | x86 | Sos.dll | 2.0.50727.158 | 377,344 | 24-May-2006 | 14:59 | x86 | System.data.dll | 2.0.50727.158 | 2,893,824 | 24-May-2006 | 14:59 | x86 |
.NET Framework 2.0 x64-based version|
Mscordacwks.dll | 2.0.50727.158 | 1,597,440 | 24-May-2006 | 06:09 | x64 | Mscorlib.dll | 2.0.50727.158 | 3,956,736 | 24-May-2006 | 11:25 | x64 | Mscorwks.dll | 2.0.50727.158 | 10,306,048 | 24-May-2006 | 06:05 | x64 | Sos.dll | 2.0.50727.158 | 476,160 | 24-May-2006 | 06:15 | x64 | System.data.dll | 2.0.50727.158 | 2,959,872 | 24-May-2006 | 11:25 | x64 |
.NET Framework 2.0 Itanium architecture version|
Mscordacwks.dll | 2.0.50727.158 | 2,710,016 | 24-May-2006 | 06:14 | IA-64 | Mscorlib.dll | 2.0.50727.158 | 3,956,736 | 24-May-2006 | 12:03 | IA-64 | Mscorwks.dll | 2.0.50727.158 | 21,260,288 | 24-May-2006 | 06:11 | IA-64 | Sos.dll | 2.0.50727.158 | 857,088 | 24-May-2006 | 06:22 | IA-64 | System.data.dll | 2.0.50727.158 | 3,102,208 | 24-May-2006 | 12:03 | IA-64 |
WORKAROUNDTo work around this problem, make sure that you use the
correct transaction isolation level. You can add code to the application to verify
whether the transaction level is correct and to throw an exception in your
code.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 6/20/2006 |
---|
Keywords: | kbprb kbtshoot kbExpertiseAdvanced KB917752 kbAudDeveloper |
---|
|