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: ODBC Driver for SQL Server Converts Double Value to SQL_NUMERIC Value Incorrectly


View products that this article applies to.

Symptoms

When an application that uses the Microsoft ODBC Driver for SQL Server (Sqlsrv32.dll) to insert a double value, and that value is stored in a SQL Server table as a numeric field, the ODBC driver may insert incorrect values. The ODBC Driver for SQL Server incorrectly rounds the numeric value while converting that value from a double value.

↑ Back to the top


Cause

This only occurs when the value of the numeric field falls in a certain range. For example, if an application inserts a numeric field value of 5,000,000,000.000000 (with a precision of 22 and scale of 6) as a double value, the ODBC Driver for SQL Server inserts the value as 5,000,000,000.000001.

↑ Back to the top


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 MDAC 2.7 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: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.

Hotfix file versions for MDAC 2.7 Service Pack 1 (SP1)

   Date         Time   Version          Size     File name
   ----------------------------------------------------------
   06-Mar-2003  19:49  2000.81.9031.35   24,576  Odbcbcp.dll
   06-Mar-2003  19:49  2000.81.9031.35  380,928  Sqlsrv32.dll

Hotfix file versions for MDAC 2.7 Refresh

   Date         Time   Version          Size     File name
   ----------------------------------------------------------
   14-Apr-2003  18:01  2000.81.9001.25   24,576  Odbcbcp.dll
   14-Apr-2003  18:00  2000.81.9001.25  356,352  Sqlsrv32.dll

Hotfix file versions for MDAC 2.6 Service Pack 2 (SP2)

   Date         Time   Version        Size     File name
   --------------------------------------------------------
   15-Mar-2003  03:18  2000.80.739.0   29,252  Odbcbcp.dll
   15-Mar-2003  03:01  2000.80.739.0  455,236  Sqlsrv32.dll

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: KB812554, kbhotfixserver, kbqfe, kbfix, kbbug

↑ Back to the top

Article Info
Article ID : 812554
Revision : 6
Created on : 10/11/2005
Published on : 10/11/2005
Exists online : False
Views : 410