Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how i can store marathi font in sql server Expand / Collapse
Author
Message
Posted Friday, April 19, 2013 5:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 21, 2014 5:44 AM
Points: 8, Visits: 31
I am going to design a application having front end with VB6.0 and Back end with SQL SERVER in. And I want the complete interface of that application in marathi language.

when I enter the marathi character in data base and execute it, it shows "????????" like this.
What I do to enter and store the marathi character in Database?

Post #1444319
Posted Friday, April 19, 2013 5:39 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:39 PM
Points: 12,903, Visits: 32,143
your table needs to use nvarchar and not varchar fields to hold unicode data.
in addition, any parameters you are using also need to be nvarchar...so in .NET language, for example if you declared a SQL Parameter that was not nvarchar, the parameter would convert your data to question marks, and then store it in a field that ahd the ability to store it correct.


Dim pAgencyAlias As New SqlParameter("@AgencyAlias", SqlDbType.VarChar, 30)
--should be
Dim pAgencyAlias As New SqlParameter("@AgencyAlias", SqlDbType.NVarChar, 30)

example of accidental implicit conversion:
/*--Results
(No column name) (No column name)
??/?? ??/??
(No column name) (No column name)
??/?? 汉字/漢字
*/
declare @var varchar(10),
@nvar nvarchar(10)
SELECT @var = ' 汉字/漢字' ,@nvar = ' 汉字/漢字'
SELECT @var,@nvar
SELECT @var = N' 汉字/漢字' ,@nvar = N' 汉字/漢字'
SELECT @var,@nvar



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1444327
Posted Friday, April 19, 2013 5:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 21, 2014 5:44 AM
Points: 8, Visits: 31
its not working
Post #1444332
Posted Friday, April 19, 2013 5:51 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:39 PM
Points: 12,903, Visits: 32,143
gamit124 (4/19/2013)
its not working


Remember we are not sitting behind you, looking over your shoulder.
i have no idea what is working or not working.

If you want help with that, you'd need to post the TSQL code you are using so we can paste it in our own SSMS and offer improvements.

the code i pasted certainly works and demonstrates that the field must be nvarchar AND the assignment must follow the N'value' format in order to preserve the values.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1444333
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse