Reading/Updating/Inserting the Unicode data using sql server 2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amollokhande1
    New Member
    • Feb 2008
    • 33

    Reading/Updating/Inserting the Unicode data using sql server 2005

    Hi All,

    I am using Sql server 2005 as a backend for my application. I want to read/write the unicode data using sql query.

    When I am using

    insert into UnicodeData values('سي') command and if we view the data using sql query analyser, it shows ??.

    On the otherhand, when i insert the same unicode data through sql enterprize manager simply copying the data in the actual field, it properly stores the data.

    Can anybody help me on how to add/update/retrive the unicode data using the sql query in sql server 2005.

    Regards
    Amol Lokhande
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    seems like your front end might be taking the unicode character codes and converting them to something else before sending them to the backend database?

    What are you using as the front end?

    Comment

    • manishtrikha
      New Member
      • Jan 2009
      • 1

      #3
      Same problem please help

      I am also having the same problem in inserting the unicode data from front end

      Regards
      Manish Trikha

      Comment

      • jvskarthick
        New Member
        • Nov 2006
        • 13

        #4
        Inserting Unicode data...

        Wrong - I think you have created the Table with VARCHAR Data type, it won’t accept the Unicode data. Check the below example
        Create table UnicodeData (Uni_Code varchar(100))
        Insert into UnicodeData values (N'سي')
        select * from UnicodeData
        Output
        ------
        ??

        Correct - created the Table with NVARCHAR Data type, it will accept the Unicode data. Check the below example
        Create table UnicodeData1 (Uni_Code nvarchar(100))
        Insert into UnicodeData1 values (N'سي')
        select * from UnicodeData1
        Output
        ------
        سي

        Comment

        Working...