473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

decimal separator, regional settings

pax

Hello there!

Here is my problem, in the simplest scenario:
- an Access 2000 format database (created with Access 2003)
- a simple table that contains one single field defined as Number, Decimal,
18,2
- VS2005 standard, C#
- a data source / dataset that cotains that simple Access table
- a DataGridView, created by drag and drop, with all the helper objects
(adapter, navigator etc) that edits that simple table
- WinXPSP2 with ***Regional Options in Control Panel set to
Romanian*** , with no other customization

And here's the problem: what magic do I have to do to enter decimal numbers
in that grid and save them in the database? Because as long as I type in
1,23 (given that the decimal separator in Romanian Regional Options is the
comma), the grid displays it correctly, I can save it to the daabase, but
when I reload the data by reopening the form, my number is 123 (and it
really IS 123 in the database!).

Thanks in advance.
pax

May 27 '07 #1
2 5096
pax

Here are some other details:
- The database is local, it resides on the computer that the app is running
on.
- I first encountered this problem on user's computer, then I was able to
reproduce it on my machine by changing the regional settings to Romanian.
- I upgraded the database to the 2003 format, the problem persists. So it's
not that.
- I used some other control to edit the data, i.e. a simple textbox, still
the same, so it's not datagridview's fault.
- I created the same dummy table on SQL, then used another dataset, the
problem's gone, so it is related somehow to Access!
- used the:
Thread.CurrentThread.CurrentCulture = new CultureInfo("ro-RO");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ro-RO");
(and also with 'false' as a second parameter, useUserOverride), of no
avail. The funny thing here is that on a machine with EN-US regional
settings and the above two lines in place, everything works fine!
- tried to set the Locale Identifier property on the connectionstring to
1048 (RO), no news.

So that's pretty much it, I'm out of any ideas...

Any help much appreciated.
Thanks a lot.
Pax

"pax" <pa*@noname.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>
Hello there!

Here is my problem, in the simplest scenario:
- an Access 2000 format database (created with Access 2003)
- a simple table that contains one single field defined as Number,
Decimal,
18,2
- VS2005 standard, C#
- a data source / dataset that cotains that simple Access table
- a DataGridView, created by drag and drop, with all the helper objects
(adapter, navigator etc) that edits that simple table
- WinXPSP2 with ***Regional Options in Control Panel set to
Romanian*** , with no other customization

And here's the problem: what magic do I have to do to enter decimal
numbers
in that grid and save them in the database? Because as long as I type in
1,23 (given that the decimal separator in Romanian Regional Options is the
comma), the grid displays it correctly, I can save it to the daabase, but
when I reload the data by reopening the form, my number is 123 (and it
really IS 123 in the database!).

Thanks in advance.
pax

May 27 '07 #2
pax

"pax" <pa*@noname.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>
Hello there!

Here is my problem, in the simplest scenario:
- an Access 2000 format database (created with Access 2003)
- a simple table that contains one single field defined as Number,
Decimal,
18,2
- VS2005 standard, C#
- a data source / dataset that cotains that simple Access table
- a DataGridView, created by drag and drop, with all the helper objects
(adapter, navigator etc) that edits that simple table
- WinXPSP2 with ***Regional Options in Control Panel set to
Romanian*** , with no other customization

And here's the problem: what magic do I have to do to enter decimal
numbers
in that grid and save them in the database? Because as long as I type in
1,23 (given that the decimal separator in Romanian Regional Options is the
comma), the grid displays it correctly, I can save it to the daabase, but
when I reload the data by reopening the form, my number is 123 (and it
really IS 123 in the database!).

Thanks in advance.
pax

May 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ordz | last post by:
I want to write a program that will take a decimal with up to 4 places and convert it to 1/16 ths. I can sort of do that with: n = 375 * 16 / 1000 Print n; "/16" I am planning to use an input...
0
by: Mihajlo Canic | last post by:
I have a very strange problem. Im working with MS Access db and oledb objects (oledbadapter, oledbcommand, oledbconnection). Im using local cultureinfo with "," as decimal separator, which is also...
2
by: Jean-Marc Blaise | last post by:
Dear all, In a version 7 Workgroup Edition FP6 on Windows, a values decimal('7.5',9,2) is correctly displayed as '7.5'. Applying FP10 or FP11 displays as '7,5' in the output grid of command...
3
by: Kim Bundgaard | last post by:
Hi Any suggestion would be fine. I have installed DB2 Connect EE V8.1 (fixpak 4) at two different Windows 2000 Servers, both have the same regional settings. I am connecting to the same DB2...
10
by: T.K Kullervo | last post by:
Hi, is there someway to change the regional settings--> numbers--> decimal separator for the the program im creating. I dont want to change it permanently but my program doesnt work if the...
19
by: aa | last post by:
when I ourput data from Access, numbers bigger than 999 are shown with letter "B" inserted into the 4th position left to the coma. (in my w2k regional settings I have the decimal dot separator set...
3
by: DustWolf | last post by:
Hello, I am wondering, what is the standard for including decimal numbers in XML code? What determines what is the decimal delimiter and what can be the grouping symbol? I have just realized...
8
by: =?Utf-8?B?T2xpdmllciBHSUw=?= | last post by:
Hello, I try to convert a volume stored as a string value in an XML file into a Decimal object. The volume is stored with comma as decimal separator ("210,12") according to french habits. To be...
2
by: pax | last post by:
Hello there! Here is my problem, in the simplest scenario: - an Access 2000 format database (created with Access 2003) - a simple table that contains one single field defined as Number, Decimal,...
6
by: avcitamer | last post by:
We upgraded our system and problem below occured, pleas help me... Windows 2003 server SP1 When I set a decimal DB field value to "123,32" (using ADODB.recordset ) updated value was ok (123.32)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.