Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Wednesday, October 29, 2014 5:37 AM
Points: 8, Visits: 32
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 @ 4:56 AM
Points: 14,436, Visits: 37,828
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
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: Wednesday, October 29, 2014 5:37 AM
Points: 8, Visits: 32
its not working
Post #1444332
Posted Friday, April 19, 2013 5:51 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:56 AM
Points: 14,436, Visits: 37,828
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1444333
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse