473,495 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 6337
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
12097
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
1375
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
5820
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...
10
21447
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
3097
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
12194
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
15022
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
5100
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
4892
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
6991
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
7160
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
7196
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...
0
7373
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
5456
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
4583
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...
0
3088
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.