Skip to content
Advertisement

Why do I get “Procedure expects parameter ‘@statement’ of type ‘ntext/nchar/nvarchar’.” when I try to use sp_executesql?

Why do I get this error

Procedure expects parameter ‘@statement’ of type ‘ntext/nchar/nvarchar’.

when I try to use sp_executesql?

Advertisement

Answer

Sounds like you’re calling sp_executesql with a VARCHAR statement, when it needs to be NVARCHAR.

e.g. This will give the error because @SQL needs to be NVARCHAR

So:

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