How to create NVarchar(max) Sqlparameter in C#? [duplicate]

This is how you explicitly set nvarchar(max):

cmd.Parameters.Add("@JobNumbers", SqlDbType.NVarChar, -1);

If you’re really concerned with performance you might want to consider passing a table of integers:
https://stackoverflow.com/a/10779593/465509

Leave a Comment