Skip to content
Advertisement

how to set N prefix before sql parameter

i writed a query like this:

and it’s work very well! and Gives me the desired result!

but i want send parameter to the query like this:

that don’t worked!

and also i tried this code:

that don’t worked,too! and No result returns!

my collation is Persian_100_CI_AI. and all of data type of columns in nvarchar

meantime, i have this code in asp.net :

how to send parameter with this code with N prefix?

Advertisement

Answer

First, write the query as:

The parameters should be set as:

Declaring the strings to be nvarchar() instead of varchar() is the most important part of the solution.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement