DB_E_CANCELLED Causes Access Violation in ADO

ID: Q241544


The information in this article applies to:
  • Microsoft Data Access Components version 2.1 SP2


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 fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next Microsoft Data Access Components service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
The English version of this fix should have the following file attributes or later:

   Date      Time    Version      Size    File name     Platform
   -------------------------------------------------------------
   9/3/99            2.12.4503    330KB   Msado15.dll

 


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION



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 : kb3rdparty kbADO kbDatabase kbDriver kbODBC kbGrpVCDB kbGrpMDAC kbDSupport kbMDAC210SP2fix kbDB2
Version : WINDOWS:2.1 SP2
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.