I am developing a web app in ASP.NET with C#. I am saving data in SQL tables as Unicode character as given by Google Transliteration. I am supposed to use Hindi. I have no issues regarding adding data. But when I use “SELECT” statements, no data is retrieved from the database tables in any case.
My Query is as follows:
SELECT uid, family_head, member_name, house_no, address, f_h_name, gender, caste, dob, occupation, literacy, end_date
FROM family
WHERE (member_name = 'समर्थ अग्रवाल')
It return null.
Change the string to start with
Nto signify it is a Unicode string:Otherwise, the string will not be a Unicode string and the query will return no results.
See Constants (Transact-SQL) on MSDN: