How to Show Eastern Letter(Chinese Character) on SQL Server/SQL Reporting Services?

后端 未结 5 840
自闭症患者
自闭症患者 2021-02-07 23:12

I need to insert chinese characters in my database but it always show ???? ..

Example:

Insert this record.

微波室外单元-Apple

Then it became ???

5条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 00:02

    Make sure the column you're inserting to is nchar, nvarchar, or ntext. If you insert a Unicode string into an ANSI column, you really will get question marks in the data.

    Also, be careful to check that when you pull the data back out you're not just seeing a client display problem but are actually getting the question marks back:

    SELECT Unicode(YourColumn), YourColumn FROM YourTable
    

    Note that the Unicode function returns the code of only the first character in the string.

    Once you've determined whether the column is really storing the data correctly, post back and we'll help you more.

提交回复
热议问题