Microsoft KB Archive/821421

= PRB: Data Is Not Correct, or Is Not as Precise as Expected, When You Use Numeric Functoids in BizTalk Mapper =

Article ID: 821421

Article Last Modified on 8/13/2003

-

APPLIES TO


 * Microsoft BizTalk Server 2002 Standard Edition

-



SYMPTOMS
When you use some BizTalk Mapper numeric functoids to calculate noninteger values, your results may not be correct or they may not be as precise as expected. For example, if you multiply 20815.2000 by 1.00, you may receive 208152000 for the result instead of 20815.2.



CAUSE
This behavior may occur if the Default System Locale on your computer running BizTalk Server (or on the computer of a user who logs on) is set to a Regional Locale that uses a different decimal separator character from the one that the data uses in the document that you are processing.



WORKAROUND
To work around this behavior, do one of the following:  Change the Default System Locale to a Regional Locale that uses the same decimal separator character as your data. Also, verify that every user who logs on locally to the system uses a Regional Locale that uses the same character for the decimal separator in the Numbers format setting and in the Currency format setting.

-or-  Insert a Microsoft Visual Basic Scripting Edition (VBScript) functoid in your BizTalk Mapper to change the locale for calculations that are performed in the map. The following sample code temporarily changes the system locale to US English: SetLocale(&quot;us-en&quot;)

Function MyFunction0 MyFunction0 = &quot;&quot; End Function This functoid uses a call to the VBScript SetLocale function, and then passes in the required Locale ID value. This action forces the correct locale setting for the duration of the BizTalk Mapper execution. 



STATUS
This behavior is by design.



MORE INFORMATION
When an interactive user logs on, the settings on the user's computer can affect the Locale ID value, and the Locale ID affects how date, time, and currency values are formatted. Microsoft recommends that you explicitly set the Locale ID value by using a BizTalk Mapper functoid. For more information, see the &quot;Resolution&quot; section.

Keywords: kbprb KB821421

-

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

© Microsoft Corporation. All rights reserved.