Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Actually I save content in sql server database but content save like ???? format
& when I retrive That content It Show Same ???.Actullay I want Hindi Content To Show In label Text .
Give Any Suggestion.
Posted
Updated 26-Dec-11 0:33am
v2
Comments
anushripatil 26-Dec-11 6:33am    
try saving the content in utf-8 format ... i guess it shud save also check ur column datattype in db. Please have a look http://www.dotnetfunda.com/articles/article1132-insert-hindi-font-from-aspnet-web-page-to-sql-server-database.aspx
Hope this helps

If this is character data, have you used for example nvarchar[^] and correct collations: http://msdn.microsoft.com/en-us/library/ms144250.aspx[^]
 
Share this answer
 
Use N before parameter i.e.

Insert into test(TextName) values(N'@TextName')

and field datatype should be nvarchar(max)
 
Share this answer
 
v2
Comments
Member 10302764 2-Oct-13 13:53pm    
Thank u ++
Kanhaiya Lal Kumawat 9-Aug-14 8:28am    
thank you
Kailash_Singh 20-Jun-20 2:25am    
thank you,
RajSekhar Alluri 3-Feb-23 6:10am    
This won't work, it will save @TextName in DB, if you use N'@TextName'

I think they said 'thank you' without trying the solution.
Hi,

You have to change the datatype of the column to nvarchar or ntext

Create table Test_Lang

(strText nvarchar(max))

insert into Test_Lang values ( N 'हिन्दी')



Thanks
Vinod
 
Share this answer
 
Comments
Dholakiya Ankit 24-Aug-13 4:45am    
nice 1
Just use NVarchar datatype and "N" before the strine name.

This will definitely solve the problem..
 
Share this answer
 
Comments
Member 8632652 16-Feb-13 5:04am    
how to retrive hindi text data from sql 2005
avinash9616 7-Nov-16 10:19am    
where to put N in c# sql query ?
Used Nvarchar Datatype in qsl database to store hindi data.

Thanks

Devendra kumar 8581823430
 
Share this answer
 
Comments
[no name] 24-Aug-13 5:58am    
Congratulations! Not only have you answered a 2 year old already answered question but you have given the exact same answer as everyone else! Twice!

Or is this just to spam your website and phone number?
Used Nvarchar Datatype in sql database to store hindi data.

Thanks

Devendra kumar 8581823430

www.softdev.co.in
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900