By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,974 Members | 1,834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,974 IT Pros & Developers. It's quick & easy.

same code produces different decimal symbol on different computers with same settings

P: n/a
I have ASP code displaying currency datatype data from Access database.

I have copies of this asp code and tha database on two w2k/IIS5 computers,
bothg having the decimal symbol set to "." in the Regional setting both for
numbers and for currency.

However on one PC it shows dots, while on the other - commas.
What is actually controlling which decimal shows up?
Jul 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Regional settings when *you* log in are not the same as IUSR (who, I assume,
is the one running the page, if you are using anonymous access).

You can force US settings (note this will also affect date formatting) by
having this at the top of each page:

Session.LCID = 1033
<aa> wrote in message news:uF**************@TK2MSFTNGP11.phx.gbl...
I have ASP code displaying currency datatype data from Access database.

I have copies of this asp code and tha database on two w2k/IIS5 computers,
bothg having the decimal symbol set to "." in the Regional setting both for numbers and for currency.

However on one PC it shows dots, while on the other - commas.
What is actually controlling which decimal shows up?

Jul 19 '05 #2

P: n/a
aa wrote:
I have ASP code displaying currency datatype data from Access
database.

I have copies of this asp code and tha database on two w2k/IIS5
computers, bothg having the decimal symbol set to "." in the Regional
setting both for numbers and for currency.

However on one PC it shows dots, while on the other - commas.
What is actually controlling which decimal shows up?


http://support.microsoft.com/?kbid=306044
Although the article covers date/time formats, it equally applies to number
formats.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #3

P: n/a
You can force US settings (note this will also affect date formatting) by
having this at the top of each page:

Session.LCID = 1033

in this format this need only be specified once in the ASP app... most
sensibly on the front page. If you want it to be local to a page you need it
like this:

<% @page lcid=1033%>
Jul 19 '05 #4

P: n/a
> in this format this need only be specified once in the ASP app...

(only if users have session cookies enabled)
be local to a page you need it like this:

<% @page lcid=1033%>


(only if there isn't already an @ directive)
Jul 19 '05 #5

P: n/a
Thanks.
I now see that in case IIS 5.0 (Windows 2000 Service Pack 2 and Later) all
the difference is hidden in two Registry's hives

HKEY_USERS/.Default/Control Panel/International
and
HKEY_CURRENT_USER/Control Panel/International

Although on the surface Regional Setting on the two computers are the same,
the parameters in the two a/m hives are slightly different. However sDecimal
(which I understand is the only parameter relevant to my query) is set to
"." in both hives on both computers. Yet one still shows ","

The article also mentiones optional OLEAUT key but it is not present in
both computers.

Setting session.LCID to something will force "." for everybody which is not
too good. Of course I can employ some logic which would select value for
LCID dynamically yet I thougth that I will be duplicating the job which is
supposed to be done by the Registry as, if I understand correctly, the
locale info for session.LCID is derived from the Registry

I've inserted
response.write session.LCID
into the page in question and on both computers I have 2048
Yet on one computer I see dots while on the other - commas. Even worse - to
enter the procces using a form on this page, on one computer I have to enter
commas but on the other - dots. Otherwise I get "Type mismatch"

Any other ideas?

<aa> wrote in message news:uF**************@TK2MSFTNGP11.phx.gbl...
I have ASP code displaying currency datatype data from Access database.

I have copies of this asp code and tha database on two w2k/IIS5 computers,
bothg having the decimal symbol set to "." in the Regional setting both for numbers and for currency.

However on one PC it shows dots, while on the other - commas.
What is actually controlling which decimal shows up?

Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.