aa said:
You think it has to do with the ASP code?
It pretty standard and does not seem to use anything which can relevant to
the problem, but might have to do with some settings on the computer, for it
works OK on my XP-Home notebook, and the problems happen on w2k Pro SP4.
Anyway, the code creates a recordset object and then goes through it
building rows for an HTML table like this:
================================
set objRS=objCom.Execute
dim html_string, c
do while not objRS.eof
c= objRS(2)
html_string=html_string&"<tr><td>" & c & "</td></tr>"
objRS.movenext
loop
Response.write html_string
================================
This gets letter "B" inserted
If I change
c= objRS(2)
to
c= FormatNumber(objRS(2),2,,,0)
then it is OK
This is simply a case of messed up regional settings. Instead of having a .
or a , for the thousands separator the (or actually a) regional setting for
it has B as the thousands seperator.
First check that this isn't the case in the control panel -> regional
settings -> numbers tab. However this isn't the only place that IIS may get
regional settings in fact it's unlikely. Regional settings are per user and
are stored in the user profile.
Typically the user accessing a web site does not have a profile on the
server (unless they've logged on interactively). Most often the user is the
anonymous user anyway.
In this case ASP get it's regional settings from the .DEFAULT user profile.
Hence you should use RegEdit and open the key:-
HKEY_USERS\.DEFAULT\Control Panel\International
In there is a value sThousand value. It seems likely to me that currently
this contains a B.
Things are made worse by the fact that ASP caches the regional settings and
will use them for the life time of the process. Hence even if other
requests may run under user accounts of user that do have a profile with
different regional settings these settings will be ignored.
Therefore you may find that .DEFAULT is ok but another user profile is wrong
and it's this profile that just happens to be the first used.
Anthony.