Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010

    Unanswered: Any way to avoid prefixing N character for unicode

    I have to support unicode data storage and retrieval in my application

    My database tables already have nchar, nvarchar columns.

    As per my knowledge, I have to prefix the values for these columns with N character in my insert/update/select statements.

    But my existing select, inserts and update statements do not have the N character prefixed to the values.

    Is there any way that I can set up some parameter or change configuration at the database server level so that I do not need to change all my SQLs to prefix the unicode data with N character?

  2. #2
    Join Date
    Feb 2004
    One Flump in One Place
    The N is optional - don't worry about it.
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Oct 2010
    4 are correct. Not prefixing N would not have an impact on my existing data and my existing SQL statements would not have problems as it is optional.

    But now my application has to support data for multiple languages. For example, if I want to enter chinese data into the same column then I need to modify my existing insert statements to prefix my values with N character.

    insert into aaa values (N'类')

    If i do not specify the N character then it would not store it properly.

    Hence is there any way around that i do not need to add the N character to my SQLs across the application and yet be able to store/retieve data in multiple languages.
    Last edited by ketansoneji; 10-11-10 at 07:12. Reason: Minor edits

  4. #4
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    There are a number of kludges that will sometimes work. Using the N prefix is simple, and it always works.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts