Knowledge Base

RequestMoneyAsNumber May Return Error "Return List_price Must Be a Number Between 0 and 2147483648"

Article ID: 175951

Article Last Modified on 9/30/2003


APPLIES TO


This article was previously published under Q175951

SYMPTOMS

When you use the Page.RequestMoneyAsNumber datafunction in Commerce Server, you may experience the following error message:
list_price must be a number between 0 and 2147483648

CAUSE

One cause for this error message is that the RequestMoneyAsNumber function uses the Number settings, rather than the Currency settings, for a specific locale. This only happens in cases where the Number format and the Currency format are not identical, such as Local &H041D (Swedish). The Swedish locale uses the following formats:
Number : 1 234,56
Currency: 1.234,56
Note the group separator of a space in the Number format and the dot in the Currency format.

WORKAROUND

To work around this problem, you can do any of the following:
  • Do not use any digit grouping symbol.
  • Use a space as the digit grouping symbol.
  • In the case of a Swedish locale, use the Danish locale in RequestMoneyAsNumber, as in the following example:

    File name: _UPDATE.ASP

    Change the following:

    list_price = mscsPage.RequestMoneyAsNumber("list_price", null, 0, 2147483648)

    To:

    list_price = mscsPage.RequestMoneyAsNumber("list_price", null, 0, 2147483648, 1030)

STATUS

Microsoft has confirmed this to be a problem in Microsoft Commerce Server versions 2.0 and 3.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: siteserver data function local seperator separater seperater

Keywords: kbbug kbenv KB175951