使用c#.net从sql服务器插入和访问数据 [英] inserting and accessing data from sql server using c#.net

查看:137
本文介绍了使用c#.net从sql服务器插入和访问数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在只能使用印地文字体访问文本框中的印地文字体时遇到问题.我给你细节...
我有一个名为"Microsoft Indic language Input Tool"的软件,该软件已将所有格式转换为印地语或英语.所以通过它我在表中以印地文字体插入值.但是当我访问该值时,它将获得编码值,但不是印地文字体.我试图通过不获取软件使用的印地语字体来转换字体.

I have a problem to access hindi font in my textbox in hindi font only. i give you the details...
I have a software it''s name "Microsoft Indic language Input Tool" which has converting all fonds in hindi or english. so by it''s use i insert value in hindi font in my table. but when i access that value then it will get coded value but not in hindi font. i was try to convert the font by not getting the hindi font that the software used.

推荐答案

我不知道您如何在数据库中插入北印度语字体.理想情况下,您应该以正确插入Unicode字符(除英语字母之外的任何其他字符)的方式进行插入.

为了插入Unicode字符,数据类型应为nvarchar,同时在SQL中插入前缀N如下:
插入tForeignLanguage([Name])值(N"此处为外国语言字符串")

尝试进行上述更改后,希望此后它可以正常工作.

希望对您有帮助.

〜Amol
I don’t know how you are inserting the Hindi font in the database. Ideally you should insert in such a way that Unicode characters (anything other than English alphabets) get inserted properly.

In order to insert Unicode characters Datatype should be nvarchar and while inserting prefix N in the SQL as follows:
INSERT INTO tForeignLanguage ([Name]) VALUES (N''foreign Language string here'')

Try after making above change, hopefully it will work fine after that.

Hope this will help you.

~Amol


这篇关于使用c#.net从sql服务器插入和访问数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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