Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 24-Mar-11 4:39am
v2
Comments
Sandeep Mewara 24-Mar-11 10:55am    
Like what? You missed the part.
[no name] 25-Mar-11 1:00am    
Plz give error details.

1 solution

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)
SQL
SET InputPhrase = N'Hello there.'


Hope this helps.
 
Share this answer
 
Comments
[no name] 25-Mar-11 1:35am    
thanks a lot buddy your answer worth me a lot :)
Once again i thank you , you were really helpful..
Krunal Panchal

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