PRB: Type Mismatch Error Occurs on Weight Property Definition Page (304345)
The information in this article applies to:
- Microsoft Commerce Server 2000
This article was previously published under Q304345 SYMPTOMS
When you use the Microsoft Commerce Server 2000 Business Desk and attempt to open the Weight property definition in the Catalog Designer module, you may see the following error:
Errors occurred while loading part of the business desk.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'float'
/RetailBizDesk/catalogs/designer/edit_PropertyDefinition.asp, line 1444
NOTE: The actual path to the edit_PropertyDefinition.asp and the actual line number may vary.
CAUSE
The regional setting for the default locale on the computer running Commerce 2000 Server is set to French (France).
RESOLUTION
In the Edit_PropertyDefinition.asp file, which is located in the Bizdesk\Catalogs\Designer folder, find the stringValue function. In the stringValue function, locate the Case statement for FLOAT_TYPE. The line of code in the Case statement for FLOAT_TYPE should be:
stringValue = replace(g_MSCSDataFunctions.Float (cStr(varValue), g_DBDefaultLocale, True, True), _sThousands, "")
To resolve this problem, change the line of code so that the cStr function is removed and reads as follows:
stringValue = replace(g_MSCSDataFunctions.Float (varValue, g_DBDefaultLocale, True, True), _sThousands,"")
MORE INFORMATION
The g_MSCSDataFunctions.Float function is expecting a floating value as the first parameter rather than a string. When English is the default locale, the value contained in varValue is a string of "-1.79E+38," which converts successfully to a valid numerical value. However, in the French locale, this number does not convert to a valid numerical value. After you change the line of code so that the cStr function does not try to convert the value, the problem should be resolved.
Modification Type: | Major | Last Reviewed: | 10/18/2002 |
---|
Keywords: | kbprb KB304345 |
---|
|