从ASP.NET插入时,guajarti文本未在sql中显示 [英] Guajarti text not displaying in sql when inserted from ASP.NET
问题描述
大家好,
我有一个有关从ASP.NET在sql中插入语言文本的查询.
我已经在Windows 7中使用区域语言设置了古吉拉特语文本,现在当我在asp.net Webform文本框中的古吉拉特语中插入文本时,它会插入文本框中,但是当我向SQL中的数据库中插入查询时,它会给我类似?
我保留了sql列varchar(max)和nvarchar(50)的数据类型,但无法将其显示给我吗?
请指导我如何将古吉拉特语文本从ASP.NET插入到sql字段中
谢谢&问候,
Krunal Panchal
Hello everyone,
I have one query regarding language text insertion in sql from ASP.NET.
I have setup the gujarati text using regional language in windows 7 , now when I insert text in gujarati in asp.net webform textbox it is inserted in the textbox but when I fire query to insert into database in sql it gives me text like ?
I have kept datatype of the sql column varchar(max) and also nvarchar(50),but it was not possible to insert it was showing me ?
Please guide me how is it possible to insert gujarati text into sql fields from ASP.NET
Thanks & Regards,
Krunal Panchal
推荐答案
为使SqlServer列接受unicode字符,必须在它们前面加上大写的"N".
例如:(用英语,我不会讲古吉拉特语:))
TextBox.Text =你好.
插入为Unicode(伪SQL)
In order for SqlServer columns to accept unicode characters they must be preceded by an uppercase ''N''.
For example: (in English, I don''t speak Gujerati :) )
TextBox.Text = Hello there.
To insert as unicode (pseudo SQL)
SET InputPhrase = N'Hello there.'
希望这会有所帮助.
Hope this helps.
这篇关于从ASP.NET插入时,guajarti文本未在sql中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!