Solved

Changing Ms access Culture

Posted on 2009-04-06
2
340 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

821 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