Microsoft KB Archive/322766

= BizDesk: Cannot Display Variants If Client Locale Differs from Server System Locale =

Article ID: 322766

Article Last Modified on 6/25/2004

-

APPLIES TO


 * Microsoft Commerce Server 2000 Standard Edition
 * Microsoft BizTalk Accelerator for Suppliers 1.0 Service Pack 1

-



This article was previously published under Q322766



SYMPTOMS
If the BizDesk client computer is set to a locale different from the system locale that is used on the server, the ListEditor HTML component (HTC) that is used to display product variants does not load.



CAUSE
In the sGetVariantIDs function in Bizdesk\Catalogs\Editor\Edit_product.asp, the width of the ListEditor field is returned as a float value, as follows: iSize = 100 / (UBound(g_aPvChar) + 2) With just one property, this results in iSize = 33.3333333333333. However, a client with a German locale interprets this as 333333333333333 and fails silently with an overflow. The result is that the ListEditor HTC is not displayed.



WORKAROUND
Replace the sGetVariantIDs function in Bizdesk\Catalogs\Editor\edit_product.asp with the following code, which converts the float value to an integer by using Cint(iSize): Function sGetVariantIDs

Dim iSize

Dim sItem Dim sItemID Dim sColumnName

iSize = 100 / (UBound(g_aPvChar) + 2) iSize = Cint(iSize) '**Statement added to convert float to int

For Each sItem In g_aPvChar sItemID = sReplaceSpaces(sItem)

If (sItem = &quot;variant_id2&quot;) Then sColumnName = g_sVariantID Else sColumnName = sItem End If

sGetVariantIDs = sGetVariantIDs & &quot;&quot; & sColumnName & &quot; &quot; Next

sGetVariantIDs = sGetVariantIDs & &quot;&quot; & L_VariantPrice_Text & &quot; &quot; End Function



MORE INFORMATION
The BizDesk client code fails with an overflow in Listsheet.htc in line 774 (set m_bDebug = true): 'Get column defaults. sFormat = xmlMetaCol.getAttribute(&quot;format&quot;) sWidth = xmlMetaCol.getAttribute(&quot;width&quot;) if isNull(sWidth) or not isNumeric(sWidth) or sWidth = &quot;&quot; then sWidth = nDefaultWidth if CInt(sWidth) <= 0 then sWidth = nDefaultWidth 'Overflow thrown here

Steps to Reproduce the Behavior

 * 1) Define a product variant with just one property (for example, color) or import the sample catalog.
 * 2) Switch the locale on a BizDesk client to German or any other locale that uses a comma  instead of a period (.) as the decimal separator.
 * 3) Open the catalog editor and display the product with the variant displayed.

Additional query words: plutonium cs2k

Keywords: kbprb kbpending KB322766

-

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

© Microsoft Corporation. All rights reserved.