Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: MTS Visual Basic Bank Sample Fails When You Disable OLE DB Session Pooling


View products that this article applies to.

This article was previously published under Q290486

↑ Back to the top


Symptoms

If you turn off OLE DB session pooling and run the Visual Basic Bank sample program three times in succession, you receive the following error message on the third iteration:
-2147217900
[Microsoft][ODBC SQL Server Driver][SQL Server]Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

↑ Back to the top


Cause

This error occurs because the Resource Dispenser (ODBCDM) is not calling SQLSetConnectAttrW(SQL_ATTR_ENLIST_IN_DTC) on the third iteration to enlist the statement in the Microsoft Distributed Transaction Coordinator (MS DTC) transaction.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in MDAC version 2.5 or later. You can download the latest version of MDAC from the following Microsoft Web site:

↑ Back to the top


More information

The Visual Basic Bank sample is installed with Microsoft Transaction Server (MTS) as part of the Microsoft Windows NT 4.0 Option Pack. By default, the sample is located in the C:\Program Files\MTS\Samples\Bank.VB folder. The instructions for the sample are in the MTS Help file on the "Setting Up the MTS Sample Bank Application" page.

Steps to Reproduce Behavior

  1. Change the OLEDB_SERVICES key under the CLSID for the MSDASQL Provider to the REG_DWORD value 0xFFFFFFFE.
  2. Run the Bank sample twice. This sample uses the SQL Server ODBC Driver.
  3. Run the Bank sample a third time. In MDAC 2.0 or 2.1, you receive the above-mentioned error message.

↑ Back to the top


Keywords: KB290486, kbmdacnosweep, kbfix, kbdatabase, kbbug

↑ Back to the top

Article Info
Article ID : 290486
Revision : 6
Created on : 5/17/2007
Published on : 5/17/2007
Exists online : False
Views : 294