BUG: Money Values Incorrectly Use Thousand Separator

Last reviewed: April 30, 1997
Article ID: Q118884

The information in this article applies to:

  - Microsoft SQL Server Programmer's Toolkit, version 4.2
BUG# 10091 (4.2)

SYMPTOMS

Under Microsoft Windows NT if the thousand separator is set to null or a space, then the dbconvert function will generate a " instead of a space or a null whenever converting a money value to a string.

NOTE: The 1000 separator is set using the International Applet in the NT Control Panel.

For example,

   SELECT $1234567.80

will display as

   1"234"567.80

Under MS-DOS or OS/2, setting the thousand separator to a null by changing the corresponding entry in SQLCOMMN.LOC to '' or leaving it blank will cause the separator to be replaced by a carry return.

For example,

   SELECT $1234567.80

will display as

   1
   234
   567.80

CAUSE

Specifying a blank or null separator through Control Panel causes Windows NT to respectively store "" and " " in the registry. DB-Library, in turn, only considers the first character.

Under MS-DOS and OS/2, DB-Library incorrectly handles a blank or null thousand separator.

WORKAROUND

For Windows NT, changing the registry entry \current user\control panel\international\sthousand to space works as expected. Setting it to null causes the separator to default to a comma.

Under MS-DOS and OS/2, do not use a null separator.

STATUS

Microsoft has confirmed this to be a problem in DB-Library version 4.20.50. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: dblib
Keywords : kbprg SSrvDB_Lib
Version : 4.2.5 | 4.2.5 | 4.2.5
Platform : MS-DOS OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.