Solved

Changing Ms access Culture

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

856 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