Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q322766

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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

				

↑ Back to the top


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.

↑ Back to the top


Keywords: KB322766, kbpending, kbprb

↑ Back to the top

Article Info
Article ID : 322766
Revision : 3
Created on : 6/25/2004
Published on : 6/25/2004
Exists online : False
Views : 333