Microsoft KB Archive/811007

= Fix: Corrupted Data When You Enable Asynchronous Fetching in SQL Server ODBC Driver =

Article ID: 811007

Article Last Modified on 9/27/2005

-

APPLIES TO


 * Microsoft Data Access Components 2.7
 * Microsoft Data Access Components 2.7 Service Pack 1
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.5
 * Microsoft ODBC Driver for Microsoft SQL Server 3.7

-



SYMPTOMS
When you use Microsoft ODBC Driver for SQL Server to fetch data in asynchronous mode, you may see that the data that is fetched is corrupted for some of the columns. This corruption does not always occur, and is random in nature. Most of the time you see that some columns of the last row that is fetched have corrupted data.

This corruption may occur when you use ODBC Driver for SQL Server that is included with the following:
 * MDAC 2.5 SP1, SP2, and SP3
 * MDAC 2.6 SP1 and SP2
 * MDAC 2.7 SP1

and you have enabled asynchronous fetching. The corruption does not occur when you use sequential fetching.



MORE INFORMATION
An application can enable asynchronous fetching by calling the following ODBC APIs:        SQLSetConnectAttr((SQLHDBC)hdbc, SQL_ATTR_ASYNC_ENABLE,(SQLPOINTER)SQL_ASYNC_ENABLE_ON, SQL_IS_UINTEGER)

SQLSetStmtAttr((SQLHSTMT)hstmt,SQL_ATTR_ASYNC_ENABLE,(SQLPOINTER)SQL_ASYNC_ENABLE_ON, SQL_IS_UINTEGER);

Workaround
To work around this problem, an application can fetch the data synchronously. By default, ODBC Driver for SQL Server sets the SQL_ATTR_ASYNC_ENABLE property to SQL_ASYNC_ENABLE_OFF. If an application must fetch the data asynchronously, you must install the fix listed in this article.

The hotfix in this article is only for MDAC 2.7 SP1.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

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 fix 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 --  20-Dec-2002  22:23  2000.81.9031.21    24,576  Odbcbcp.dll 20-Dec-2002 22:22  2000.81.9031.21   385,024  Sqlsrv32.dll 23-Dec-2002 20:23  6.0.2600.0        300,544  811007_mdac27_x86.exe



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.

Keywords: kbbug kbfix kbqfe kbdatabase kbhotfixserver KB811007

-

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

© Microsoft Corporation. All rights reserved.