Last post May 05, 2011 09:25 PM by wisam76m
Apr 14, 2006 02:42 AM|mubasharghazi|LINK
I am developing an application where i want to store the different language (i.e. chines,Arabic,urdu etc) character in database (SQL Server). so when i store arabic characters in SQL server , it stores the (???????).
datatype of field is nvarchar.
is anybody know about the problem and solution.
Apr 14, 2006 01:59 PM|Caddre|LINK
The problem is called character conversion and you are getting it because you are using only NVarchar without doing column level collation for Arabic in your database. There are three collations for Arabic in
SQL Server 2005. If you are using SQL Server 2000 you can still do column level collation, the links below deals with SQL Server 2005.
Hope this helps.
Dictionary order, case-sensitive
Dictionary order, case-insensitive
Apr 15, 2006 01:58 AM|mubasharghazi|LINK
thanks for ur response
but i m still getting problems......
i m pasting the whole code below.while executing it show the exception
Cast from string "گ" to type 'Byte' is not valid.
convertC = UniToVar(c) ' function written below
lblMsg.Text = "Values have stored in database"
lblMsg.Text = ex.Message
Dim b() As
b = Encoding.Unicode.GetBytes(sText)
Catch ex As Exception
Apr 17, 2006 12:55 AM|mubasharghazi|LINK
i have posted the whole function in previous message.......and need the solution in very short time....... hoping early resopnse by ur side
Dec 25, 2007 08:04 PM|mmahfouz|LINK
I want to query the database using SQL statements that contain Arabic letters... for example, this query won't return any results that start with the letter 'ص' even though if I try any english letters it works perfectly:
SELECT ArtistID, Name
WHERE (Name LIKE 'ص' + '%')
I also tried switching:
SELECT ArtistID, Name
WHERE (Name LIKE '%' + 'ص')
but it won't work.. any ideas ?
Dec 26, 2007 06:39 AM|dhimant|LINK
See if the post http://forums.asp.net/t/1167422.aspx can be helpful.
Dec 22, 2008 05:00 AM|Irfan_1|LINK
in your qurey use "N" before your field value for example "insert into [UrduTextTable] values(N'" + txtUrduString + "')
How insert Arabic/urdu characters in SQL server
May 05, 2011 09:25 PM|wisam76m|LINK
use this in your SQL Statement considering "content" is a variable containing the Arabic string you want to insert. "update Table set contents = convert(text, N'" + content + "' collate Arabic_CI_AS)" it works fine