iT邦幫忙

0

資料表定義 text , char 怎麼無法打中文

  • 分享至 

  • twitterImage

vs2017
中文怎麼會變亂碼
https://ithelp.ithome.com.tw/upload/images/20180127/20104326U1Ad14hMGG.png

https://ithelp.ithome.com.tw/upload/images/20180127/20104326FBt6cK3Cm8.png

神Q超人 iT邦研究生 5 級 ‧ 2018-01-27 17:13:46 檢舉
把型態換成nchar,然後重存試試看
alex9453 iT邦新手 2 級 ‧ 2018-01-28 08:04:10 檢舉
可以了 , 謝謝
https://dotblogs.com.tw/topcat/archive/2008/03/04/1144.aspx
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

1
小魚
iT邦大師 1 級 ‧ 2018-01-27 21:00:43
最佳解答

這跟語系(定序)有關,
如果要多語系的話,
建議資料欄位型態用 NVarChar
Insert或Update的時候用N''

範例

UPDATE TEST SET NAME = N'小魚' WHERE ID = 1;

我要發表回答

立即登入回答