Solved

Changing Ms access Culture

Posted on 2009-04-06
2
335 Views
Last Modified: 2013-11-07
Dear Experts,
I am working on a project developed in vb.net, and using MDB files as databases,
recently we have encountered a serious problem as we tested our application abroad (Germany) ,
we have found out that our application can't handle the German decimal separator , they use a comma instead of a dot, what happened is every parsing from string to number got messed up ,
for example parsing the number 4.23 would result in 423, and many more problems.

as a temporary solution until we code all the project correctly with globalization format parsing,
we want to lock our application to en-us culture only, which means the application would display an "en-us" cultureInfo only at the UI and data.

so i have found a way doing that in .NET framework , it is working great ,
the problem now is the connection to MS Access, right now if i use a comp using German Regional settings , i see my application the same as en-us but when linking to the database ,
the db still on German regional settings which creates various conflicts ,

THE QUESTION:
is there anyway i can set a connection to access mdb files so the connection will be in "en-us" format??  ( dates numbers ....) on insert queries should be en-us all the time.

any tip on the subject will be very helpful thanks in advance!!
0
Comment
Question by:TehKantz
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 24084494
HOW TO: Set Current Culture Programmatically in an ASP.NET Application
http://support.microsoft.com/kb/306162
Description: There will be an error if the culture    setting is different. 

For example, Excel is English version but   the OS is not English version or the regional setting 

is not English
 

System.Globalization.CultureInfo oldCI =  System.Threading.Thread.CurrentThread.CurrentCulture;

System.Threading.Thread.CurrentThread.CurrentCulture = 

    new System.Globalization.CultureInfo("en-US");

// add localization codes hereSystem.Threading.Thread.CurrentThread.CurrentCulture 

// = oldCI;

Open in new window

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now