Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/108158

From BetaArchive Wiki

FIX: Float Data May Cause Data-Conversion Overflow in ISQL/w

PSS ID Number: Q108158 Article last modified on 10-31-1994

4.20

WINDOWS

The information in this article applies to:
- Microsoft SQL Server version 4.2

BUG# NT: 9661 (4.2)

SYMPTOMS

Certain floating point numbers are not correctly displayed by ISQL/w. For example, executing the following TRANSACT SQL statement:

SELECT 0.0006

Will generate



(1 row(s) affected)

DB-Library: Data-conversion resulted in overflow.

This is caused by the inherent loss of precision incurred when representing float data. Certain floating point values will be converted into wide character strings which cannot be displayed by ISQL/w - - 0.0006 but will be converted to the following string 6.000000000000001e-004.

WORKAROUND

Use the TRANSACT SQL STR function when retrieving data of type FLOAT. Unless information which can only be represented as float needs to be stored, use the other available datatypes.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 4.2. This problem was corrected in SQL Server version 4.21. For more information, contact your primary support provider.

Additional reference words: 4.20 4.20.11 dblib dbroutines dbconvert KBCategory: kbother KBSubcategory: SSrvWinNT SSrvAdmin SSrvGen

=================================================================

Copyright Microsoft Corporation 1994.