473,662 Members | 2,547 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
5 5665
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******** ******@TK2MSFTN GP11.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
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
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
> 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
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_US ER/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******** ******@TK2MSFTN GP11.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
399
by: Viviana Vc | last post by:
Hi all, I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088) and I noticed that by building the exact same code twice the generated binaries are different (not much, but they are). To be sure I tried a simple console application like void main(){} and 2 times rebuilding the project gets 2 different binaries. Has anybody any clue why this happens? Could I somehow change a setting or something to remove those diff (I
1
1493
by: Phil Powell | last post by:
Dim brinksterAdRemoveRegexp set brinksterAdRemoveRegexp = new RegExp brinksterAdRemoveRegexp.Pattern = "(<!-{2,}*BEGIN.+*END.+PLEASE REMOVE*-{2,}>)" brinksterAdRemoveRegexp.Global = TRUE brinksterAdRemoveRegexp.IgnoreCase = TRUE brinksterAdRemoveRegexp.Replace(bandOriginDropdown, "") brinksterAdRemoveRegexp.Replace(bandStyleTextField, "") brinksterAdRemoveRegexp.Replace(bandDescriptionTextField, "")
0
1169
by: Andrés Giraldo | last post by:
Hi! I have a a store procedure in SQL Server 2000 that returns a decimal field, if I run the sp in SQL Server it shows me the '.' as the decimal symbol, as is configured in the regional settings in the control panel. Now, I use the store procedure as the datasource of a asp.net datagrid and a asp.net textbox, but it shows me the ',' as the decimal symbol. Hows that possible?, the database server, the application server and the
2
4877
by: Ya Ya | last post by:
I have developed a class library for a web application of mine. When compiling the code of the class library on one development machine and copy DLL to my web server I get dd/mm/yyyy date format when using the Now() function. When compiling the same code on another machine and copy the DLL to the same web server I get mm/dd/yyyy date format. I have not change the web.config of the application on the web server (I
1
2135
by: GAVO-UK | last post by:
Hello everyone Using Access 2003 I'm trying to convert a currency field into a 6.2 format in a query without the decimal symbol e.g. £582.40 = 00058240 At the moment I have Format$(,"000000") but this would only result in 000582 without the decimals.
2
2529
by: corley | last post by:
Hello world, I am having a problem with the decimal symbol. The result of writing a floating-point-number to an xml document (using libxml2 from xmlsoft.org) is <number>10,1234</number> The result I want is a dot as decimal symbol, like this <number>10.1234</number>
2
1677
by: NDayave | last post by:
How do, A while ago i had the problem of backing up a Access 2002 table with unique data that changed in some tables but not others, resulting in restore failure. This was sorted by NeoPa with the (Modified) SQL code: INSERT INTO tblBookings (, , , , Transport )
1
2723
by: Joza | last post by:
Hi everybody! I have question about setting decimal symbols... In some countries, for example in my country we use comma for decimal symbol, but in in some other countries it is decimal point. The problem is when I use comma and want to save data in database. For example if i want to save number 4,50 it saves like 450, but if i write 4.50 it regulary saves the number in that format. My question is how to make to program knows what to...
0
1284
by: dan | last post by:
I have 5 aspx pages that I'd like to share the same code behind file. Those pages have the same set of 'core' controls and object data sources. Is this a good practice? It seems that VS2005 cannot handle it - gets into an endless loop of reading the aspx files. Any alternatives? Thanks,
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8764
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.