BizDesk: Cannot Display Variants If Client Locale Differs from Server System Locale (322766)



The information in this article applies to:

  • Microsoft Commerce Server 2000
  • Microsoft BizTalk Accelerator for Suppliers, version 1.0 SR1

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 = "variant_id2") Then
			sColumnName = g_sVariantID
		Else
			sColumnName = sItem
		End If

		sGetVariantIDs = sGetVariantIDs & "<column id='" & sItemID & "' width='" & iSize & "'>" & sColumnName & "</column>"
	Next

	sGetVariantIDs = sGetVariantIDs & "<column id='variant_price' width='" & iSize & "'>" & L_VariantPrice_Text & "</column>"
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("format")
	sWidth = xmlMetaCol.getAttribute("width")
	if isNull(sWidth) or not isNumeric(sWidth) or sWidth = "" 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.

Modification Type:MajorLast Reviewed:6/25/2004
Keywords:kbpending kbprb KB322766