แก้ปัญหา UTF-8 แสดงเป็น ???????? ใน MS-SQL

พอดี html ให้ charset เป็น utf-8 แต่แต่ตอนรันแล้ว Insert ข้อมูลที่เป็นภาษาไทยลงใน database เป็นตัวหนังสือดันกลายเป็น ‘????????’ อ่อ ! ผมใช้ SQL Server 2005 Express ครับ
วิธีแก้ดังนี้
ให้ตั้งค่าตอนสร้าง Database
1.กำหนด Properties
1
2.เลือก เมนูOptions เปลี่ยน Collation ไปเป็น Thai_CI_AI
2

หรือใช้คำสั่ง

ALTER DATABASE ชื่อฐานข้อมูล COLLATE Thai_CI_AI

ปล. ถ้ายังไม่ได้ให้ Restart เจ้า SQL Server 2005 Express สักครั้งนึง

You can leave a response, or trackback from your own site. Responses are currently closed, but you can trackback from your own site. You can skip to the end and leave a response. Pinging is currently not allowed. Both comments and pings are currently closed.
Powered by WordPress | Shop Free T-Mobile Phones Online | Thanks to Verizon Phones without Contract, MMORPG Games and Sell Car