改变文化信息 [英] Changing culture Info

查看:82
本文介绍了改变文化信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我使用访问数据库作为.net应用程序的一部分,

i需要启动与访问MDB文件的连接,因此日期和数字的文化信息将始终打开 en-us。


有没有人知道它是否有可能实现这一点以及如何实现?

hey , i am using an access DB as part of .net application ,
i need to start a connection to the access MDB file so the culture info of dates and numbers will always be on "en-us".

does anyone know if its possible to achieve that and how?

推荐答案

这是什么意思做你的连接?我担心你的问题不是很清楚(至少对我来说)。如果您再次更清楚地解释它,可能会得到更好的结果,记住我们无法看到它并依赖于您的解释,混合我们自己的一般Access体验。


欢迎光临< b>字节!
Is that something to do with your connection? I''m afraid your question is not very clear (to me at least). You may get better results if you explain it again a little more clearly, remembering we cannot see it and rely on your explanation, mingled in with our own general Access experience.

Welcome to Bytes!


对不起,

这里是完整的故事:


我我正在开发一个在vb.net上开发的项目,并使用MDB文件作为数据库,

最近我们遇到了一个严重的问题,因为我们在国外测试了我们的应用程序(德国),

我们发现我们的应用程序无法处理德语小数分隔符,它们使用逗号而不是点,发生的事情是每个从字符串到数字的解析都搞砸了,

例如解析数字4.23将导致423,以及更多问题。


作为临时解决方案,直到我们用全球化格式解析正确编码所有项目,

我们想把我们的应用程序锁定到en-us文化中,其中m应用程序将显示en-us。 cultureInfo只在UI和数据上。


所以我在.NET框架中找到了一种方法,它工作得很好,

现在的问题是与MS Access的连接,现在,如果我使用德语区域设置的comp,我看到我的应用程序与en-us相同但是当链接到数据库时,

数据库仍然在德国区域设置产生各种冲突,


问题:

无论如何我可以设置连接来访问mdb文件,因此连接将在en-美国"格式??插入查询中的(日期数字....)应该始终是我们的。


提前感谢这个主题的任何提示都会非常有用!!
sorry about that,
here is the full story:

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 untill 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!!


啊。


我认为没有。让我解释一下。


Access BE(后端)数据库实际上与其他BE数据库(真正的服务器)不同。 Access通过本地Access引擎处理BE数据库。没有办法将本地数据库和BE之间的本地设置分开。


我会问为什么这应该有所不同。只要数据全部可访问,它应该在德国显示为德语,在美国显示为英语等。我可以预见的唯一问题是某些数字字段存储为字符串。如果是这种情况,我肯定会考虑修复问题的这一部分,并让每个用户看到数据作为其国家/地区的惯例。
Ah.

I don''t think there is. Let me explain.

Access BE (Back-End) databases are really not like other BE databases (which are true servers). Access processes the BE databases via the local Access engine. There is no facility to separate local settings between local databases and the BE ones.

I would ask why this should make any difference. As long as the data is all accessible it should show as German in Germany and English in USA etc. The only problems I could foresee is that certain numeric fields are stored as strings. If that is the case I would certainly consider fixing this part of the problem instead, and letting each user see the data as the convention for their country indicates.


这篇关于改变文化信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆