I have a problem when I try to insert arabic text as sql variable in sql server 2008 , inserts data like this value ???? .How to solve this?
This is my query
insert into tests values(N''+@name)
The result shows like this:

Try this and you will see what Data Type you shoule use :
DECLARE @V1 VARCHAR(50) = 'فيلم';
DECLARE @V2 NVARCHAR(50) = N'فيلم'
SELECT @V1 Varchar_Col, @V2 NVarchar_Col
Demo
Update:
Try to use SqlDbType.NVarChar when you pass your Parameter.
and you can also try with :
INSERT INTO tests (ID_Number) VALUES (@name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With