Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi
Getting a problem to insert Urdu Language in C#
when ever i write urdu language and try to insert into database.
????????? is being insert in table insted of Urdu language.
if i write "اسلم" and insert into database then question mark like ????????? in being inserted
Can any one help me in this problem
Regards.
Posted

Dear Usman,

Remember, In database put the Datatype of your Field in nvarchar and when saving into database use

N'yourUrduText'

for example

SQL
insert into [tablename] ([fieldname]) values ('N'@urduvalue)


please check the value before inserting into database it should be like following

N'ايک گائے اور بکري · بچے کي د'


Thanks
Ashish
Mark it answer if this is your solution, so that other can refer the solution
 
Share this answer
 
v3
Comments
Rahul Rajat Singh 12-Jul-12 0:23am    
I think this should work. although I think, "'N'@urduvalue" should be "'N' + @urduvalue." Check it on your end to confirm.
Sergey Alexandrovich Kryukov 12-Jul-12 0:44am    
Wow. I used to more or less successfully explain to people from India how to work with some Indian languages (more exactly, scripts or writing systems, but most inquirers did not know that). Really. I still don't understand why there were so many problems, as most of the Indian writing systems are quite popular, so they are supported by nearly all modern OS by default, so all Indian scripts I tried worked on my computer without any additional installation (well, the know fact is that the relatively newly standardized Indian Rupee character required special font to render correctly :-). I'm so glad there is a person from India who can help here. My 5.
--SA
AshishChaudha 12-Jul-12 1:23am    
Thanx
Rahul Rajat Singh 12-Jul-12 1:36am    
I too agree wit SA.

Ashish, Getting praised by SA is a big deal. He is a legend here in QnA section.
pradiprenushe 12-Jul-12 1:32am    
Thanks for solution.
Hi follow this link for save urdu in database using c sharp source code also attach for download.. http://codingresolved.com/discussion/218/how-to-save-urdu-in-sql-server-using-c[^]
 
Share this answer
 
v2

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