how i can store marathi font in sql server

  • 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?

  • 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!

  • its not working

  • 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!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply