Categories
Technical

Storing fonts into SQL Server Database

Recently I got a project from one of my relative’s organization. It deals about maintaining their customer’s details along with their credit amount and it must generate reports based on their specification and exporting the report results into excel sheet.

Actually I thought it was an easy one to do with ASP.Net grid view controls. So I have started with that. In that application we must store the customers name in Tamil font. It was the main one. Every name will be a combination of tamil and english letters. For example, his/her initials will be in english and name will be in tamil.

To store these type of data into the database we can use the data field type “nVarChar” in SQL server.I am using SQL server 2005 express edition. It is mainly for storing UniCodes. While inserting the data into the database add a prefix “N”. For example your insert query must be like
insert into karthidb(N’unicodedata’,30);

It must be like this. Really it was very much useful for me. I used Thagadoor font and also a java script for toggling from tamil font to english font and vice versa. For any doubts regarding this feel free to contact me.