How to create NVarchar(max) Sqlparameter

This is how you explicitly set nvarchar(max):

script

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

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

Quelle: http://stackoverflow.com/questions/21087950/how-to-create-nvarcharmax-sqlparameter-in-c