Microsoft KB Archive/290486

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

Article ID: 290486

Article Last Modified on 5/17/2007

-

APPLIES TO


 * Microsoft Data Access Components 2.0
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.1
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.1 Service Pack 1

-



This article was previously published under Q290486



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.



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.



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:

http://msdn2.microsoft.com/en-us/data/aa937695.aspx



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 &quot;Setting Up the MTS Sample Bank Application&quot; 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.

Additional query words: -2147217900

Keywords: kbbug kbfix kbdatabase kbmdacnosweep KB290486

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.