MS SQL Server with Khmer Unicode

MS SQL Server is a product of Microsoft that we use it for store data, information and we can easy find that data when you need. MS SQL Server is the database application for manage data or any information of organization. If we compare with MS Access we can say MS SQL Server is better because MS SQL Server have more features, tools, function than MS Access in manage data.  Today I have one topic to share you about how to make MS SQL Server support with Khmer Unicode.
This is the topic that shows you about how to insert, update, delete data in Khmer to table and how to search data as Khmer language. It is the nice topic that can help who that starting build application with Khmer Unicode

1. How can we insert Khmer Unicode to table?

You need to configure something when you create table. If you want your table support with Khmer Unicode please choose datatype is nvarchar and in collation properties Khmer_100. Please create tblStudents(ID,Name,Sex) and set datatype below:


In field Name properties please set Collation to Khmer_100


2. After you create table you need to know the query that can input Khmer Unicode to table also.

             insert into tblStudents(ID,Name,Sex)
             values('1',N'សុវណ្ណ','M')

“N” character is the special string that allow input Khmer Unicode to field of table. Please run this script and see the result in table.


       3. How to Search with Khmer Unicode

           We need still use “N” when we search data in tblStudents. Please see example below:

       Select * from tblStudents
       where Name='សុវណ្ណ'

          if we write this select we will now have data.


            Then try to change to this scripts

      Select * from tblStudents
      where Name=N'សុវណ្ណ'

              Result:


You also can use “Like” to select with Khmer Unicode too.


This topic is very useful to help you to build application by using Khmer Unicode. And I hope it can help you to build application. If you have any issue please command I will to support you.

3 comments:

  1. ខ្ញុំបានសាកល្ប វាយអក្សរខ្មែពី interface visual studion ចូលទៅក្នង Sql server វាមិនបង្ហាញជាអក្សរខ្មែរ ទេវាបង្ហាញ???????? តើមានវិធីណាអាចជួយបានទេ?សូមអរគុណ

    ReplyDelete
    Replies
    1. ដាក់ N ពីមុខ data ដែលបញ្ជូនទៅ..Ex: N' your data'

      Delete
  2. ដាក់ N ពីមុខ data ដែលបញ្ជួនទៅ Ex: N'your data'

    ReplyDelete