Decimal points and komma's 
Author Message
 Decimal points and komma's

Hello,
I'm just new in developping in VB.
I created an application which writes some transactions
to an ACCESS DB.
I created the app on Windows XP with regional setting
English(US) where a decimal point is used and a komma is
used as a thousand seperator.

When I run the app on a Windows machine where the
regional setting are Netherlands where the komma is used
as a decimal point and a point is used as a decimal
operator.

When I write a decimal number to the database :

txbBedr.text = 123,45
I write to the DB CSng(txbBedr.text). In the database it
says "12345" instead of "123,45"

Is there anyway to avoid this ?

Thanks in advance.

Erwin,



Fri, 21 Jan 2005 16:02:52 GMT  
 Decimal points and komma's
You are confusing two issues. Regional settings have no effect on the way
data is stored in the database. All numeric values are stored in internal
data formats that are the same way, whatever the region or language. The
regional settings affect only the way numbers are displayed and the way they
are interpreted when (eg) you entering data and using functions like CSng().

So there's nothing going wrong in your app. When you look at the database
you are seeing the value in its 'raw' form, without the regional settings
applied to it. If you want to see the numbers formatted, set a display
format for the field.


Quote:
> Hello,
> I'm just new in developping in VB.
> I created an application which writes some transactions
> to an ACCESS DB.
> I created the app on Windows XP with regional setting
> English(US) where a decimal point is used and a komma is
> used as a thousand seperator.

> When I run the app on a Windows machine where the
> regional setting are Netherlands where the komma is used
> as a decimal point and a point is used as a decimal
> operator.

> When I write a decimal number to the database :

> txbBedr.text = 123,45
> I write to the DB CSng(txbBedr.text). In the database it
> says "12345" instead of "123,45"

> Is there anyway to avoid this ?

> Thanks in advance.

> Erwin,



Sat, 22 Jan 2005 08:00:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. decimal point, komma problem

2. decimal point, komma problem

3. Convert decimal comma to decimal point

4. Decimal point problem

5. decimal point

6. Removing Decimal Points from Numbers

7. decimal point - strange behaviour macro Word 97 and previous vers ion

8. comma and decimal point

9. decimal points in mshflexgrid

10. Decimal point problem VB and Oracle

11. aligning decimal points

12. MASKEDEDITBOX USING DECIMAL POINT

 

 
Powered by phpBB® Forum Software