Click here to Skip to main content
15,889,820 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to store hindi data in sql server 2005 through VB.Net??
Please Help me?
Posted

In sql table set your column's datatype nvarchar(Max)

and while insert
SQL
insert into tbl(col1) values(N'text')

Happy Coding!
:)
 
Share this answer
 
v2
Comments
Priyanka Jain 22-Apr-13 7:08am    
i tried but didnot convert into Hindi...
Ank_ush 26-Aug-13 1:19am    
the above answer is correct. But is it possible to view the stored data in sql server in marathi or hindi language whichever (I am using marathi). if possible please let me know....
Aarti Meswania 22-Apr-13 7:12am    
it will not convert text in hindi
but it will insert text in hindi

select textbox set it's font hindi now, passtextbox's text in sql query
Aarti Meswania 26-Aug-13 1:32am    
yes it will show same data you stored
try this...
declare @demo nvarchar(100)
set @demo = N'विद्या' -- set / insert val.
select @demo -- select (retrive value)
Priyanka Jain 22-Apr-13 7:18am    
i set textbox font in hindi and while typing in textbox it displays in hindi but does not save in hindi??what to do?there is any property for Textbox?
Hi,

In order to store data of hindi or any other language, just make the column datataype as "nVARCHAR" or "nTEXT" or "nCHAR", and pass the values as it is you do normally by using INSERT statements.

refer Ado.net with Localization[^]

you can also refer SQL SERVER 2005 Multiple Language Support[^]

hope it helps.
 
Share this answer
 
v2
Hi,
use nvarchar datatype & insert hindi in unicode... so simple
(note: dont use string fuction tostring() or trim() etc... insert as it as )

thank you
 
Share this answer
 
v2
SQL
Below are the step to save and get Unicode character (Any language other than 
 English except some langs) string in database
1) Use nVarchar data type for corresponding field
2) insert values in corresponding column prefixed with capital N as values(N'text')
 
Share this answer
 
v2
Comments
[no name] 30-Jul-13 9:29am    
In other words, your solution is just to do what solution 2 says?
GyaneshNootan 31-Jul-13 1:52am    
@ThePhantomUpvoter above solution is also true in case of hindi
You just need to write insert query like below
insert into YourTableName(ColName) values(N'भारत')

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