Data set does not return Arabic Characters in return
-
16. dubna 2012 10:57
I have created a table
CREATE TABLE [dbo].[Arabic](
[ID] [int] NULL,
[val] [nvarchar](50) NULL,
[arabic] [nvarchar](50) WITH COLLATE 'Arabic_CI_AS'
) ON [PRIMARY]I have pasted this code as sample, When i try to insert arabic data into 3rd column i got following result.
insert into arabic values (1,'Bismillah Ar-rehman Ar-raheem','بسم اللہ الرحمٰن الرحیم')
ID val arabic
1 Bismillah Ar-rehman Ar-raheem ??? ???? ??????? ??????Now how can i get arabic data in my result set.
Shamas Saeed (if Post helpful please mark as Answer) http://shamas-saeed.blogspot.com
- Upravený Shamas Saeed 16. dubna 2012 10:58
Všechny reakce
-
16. dubna 2012 10:59
I have read this article but did not get enough support
http://msdn.microsoft.com/en-us/library/cc295829(v=sql.90).aspx
Shamas Saeed (if Post helpful please mark as Answer) http://shamas-saeed.blogspot.com
- Upravený Shamas Saeed 16. dubna 2012 10:59
-
16. dubna 2012 11:03
Hello Shamas,
You have to use the N prefix for unicode strings, means raheem', N'بسم اللہ الرحمٰن الرحیم') :
insert into arabic values (1,'Bismillah Ar-rehman Ar-raheem', N'بسم اللہ الرحمٰن الرحیم')
Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich täglich
Blog Xing- Označen jako odpověď Shamas Saeed 17. dubna 2012 7:46
-
16. dubna 2012 11:04
OOOOOHhh i got the solution by my own. Its so easy .
i have tried this
insert into arabic values (1,N'بسم اللہ الرحمٰن الرحیم this is my test',N'بسم اللہ الرحمٰن الرحیم')
and i get following output
ID val arabic
1 بسم اللہ الرحمٰن الرحیم this is my test بسم اللہ الرحمٰن الرحیم
now when i look at this link again http://msdn.microsoft.com/en-us/library/cc295829(v=sql.90).aspx it says 'N' mention that is a unicode insertion.
Thanks every one.
Shamas Saeed (if Post helpful please mark as Answer) http://shamas-saeed.blogspot.com
- Označen jako odpověď Shamas Saeed 16. dubna 2012 11:04