在SQL数据库中存储Pound符号时出现问题 [英] Problem storing Pound symbol in SQL database

查看:134
本文介绍了在SQL数据库中存储Pound符号时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,可以将asp网页表单中的文本信息存储到数据库中。当我输入50英镑(没有引号)时,我存储在数据库中的是?£50。我不明白为什么数据库字段中有问号。任何人都可以解释为什么会这样吗?



谢谢

I have a webpage that stores text information from a asp web form to a database. When I type in "£50" (no quotes), what I get stored in the database is "?£50". I don't understand why the question mark is there in the database field. Can anyone explain why this is happening?

Thanks

推荐答案

你的专栏的数据类型是什么?如果数据类型是例如 varchar (sql server数据库),您可能希望尝试将其更改为 nvarchar



也许明智的做法是将金额(50)保存在十进制列中,将货币保存在不同的列中。
What is the datatype of your column? If the datatype is for example a varchar (sql server database) you may want to try to change it to nvarchar.

Maybe it's wise to keep the amount (50) in a decimal column and the currency in a different column.


这篇关于在SQL数据库中存储Pound符号时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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