Microsoft KB Archive/241544

= DB_E_CANCELLED Causes Access Violation in ADO =

Article ID: 241544

Article Last Modified on 10/7/2005

-

APPLIES TO


 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.5 Service Pack 3

-



This article was previously published under Q241544



SYMPTOMS
An access violation occurs in ActiveX Data Objects (ADO) if connection.Execute or command.Execute returns DB_E_CANCELLED.

This problem occurs primarily under conditions where there is a transaction or command time out on a synchronous connection and the driver returns a SQLState of S1008 "Operation cancelled," which is normally reserved for asynchronous activities. Open Database Connectivity (ODBC) error S1008 is mapped by the ODBC provider to DB_E_CANCELLED.

In conjunction with the access violation, errors similar to the following occur in an ODBC trace file:

[S1008] [IBM][CLI Driver][DB2/6000] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014 (-952)

The error is not readily reproducible, and has been experienced only with IBM's DB2 ODBC driver. The Microsoft ODBC drivers do not return S1008 on synchronous function calls, because synchronous calls cannot normally be cancelled.



CAUSE
Internal to ADO, certain context variables related to cached error information, including interface pointers, are not properly initialized. Later, because the interface variable is not NULL, Release is called on the interface pointer but the address it points to is completely invalid.



RESOLUTION
A 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 Microsoft Data Access Components 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:

http://support.microsoft.com/contactus/?ws=support

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. The English version of this hotfix has the file attributes (or later) 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.   Date      Time    Version      Size    File name 3-Sep-1999       2.12.4503    330KB   Msado15.dll

MDAC 2.5 SP3
  Date      Time    Version      Size    File name - 23-Mar-2004 01:59 2.53.6302.0  487,424   Msado15.dll 22-Mar-2004 22:08 3.520.6302.0 212,992  Odbc32.dll 28-Oct-2003 21:44 3.70.11.46  24,848    Odbcbcp.dll 22-Mar-2004 17:58 3.520.6302.0 102,672  Odbccp32.dll 28-Oct-2003 21:44 3.70.11.46  524,560   Sqlsrv32.dll



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



Manual Installation

 * 1) Close or stop any applications or services that are using Msado15.dll. This may include Internet Information Server (IIS), Microsoft Transaction Server (MTS), and any ADO or OLE database (DB) applications.
 * 2) Download the hotfix version of Msado15.dll into a temporary directory.
 * 3) Locate and rename the current version of Msado15.dll, which should be in the \Program Files\Common files\System\Ado folder.
 * 4) Copy the hotfix version of Msado15.dll into the same location, and restart your services and applications.

Important Notice for Microsoft Windows 95/98 Users
If you are installing this fix onto a computer running Windows 95 or a computer with the original release of Windows 98, you may need to install the Windows 98 Migration DLL included with this fix. Please carefully read the Migrate_qfe.txt file that is included Migration.exe file included with the download.

Additional query words: ibm db2 odbc transaction command timeout db_e_cancelled operation cancelled interrupt ado access violation av s1008

Keywords: kbbug kbfix kbqfe kbmdac210sp2fix kbdatabase kb3rdparty kbdriver kbdb2 kbhotfixserver KB241544

-

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

© Microsoft Corporation. All rights reserved.