如何处理法国文化中存储过程的传递参数 [英] how to handle passing parameter for stored procedure in French culture

查看:91
本文介绍了如何处理法国文化中存储过程的传递参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,请考虑以下sp SPText 。在美国文化中,由于小数分隔符(参数),参数(12.34)表现为单个参数。但在法国文化中,相同的参数表现为两个单独的参数,因为法语将昏迷视为分隔符(12,34)。 />


Exec SPText 12.34



我们可以通过用点替换逗号来解决这个问题,但它可能不是可行的解决方案在巨大的应用程序中。



有没有其他方法可以实现这个目标?



谢谢。

For example, Consider below sp SPText. In US culture the parameter(12.34) behaves as a single parameter due to the decimal separator .(period).But in French culture, the same parameter behaves as two separate parameter because french considers coma as separator(12,34).

Exec SPText 12.34

We can solve this by replacing comma by dot, but it may not be feasible solution in huge application.

Is there any other way to achieve this ?

Thank you.

推荐答案

SQL是否将12,34视为数值?我很确定你需要在将它传递给数据库之前使用国际化将它转换为客户端应用程序中的有效数字。



Unicode将允许法语文本存储但数字必须存储为数字,格式输入和输出取决于客户端应用程序而不是数据库。
Does SQL consider 12,34 as a numeric value? I'm pretty certain you need to convert this to a valid numeric in your client app using internationalisation before passing it to the database.

Unicode will allow french text to be stored but a number must be stored as a number, formatting in and out is up to the client application NOT the database.


这篇关于如何处理法国文化中存储过程的传递参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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