I keep getting the exception
The SqlParameterCollection only accepts non-null SqlParameter type objects, not String objects
, while execut
I ran into the same error when I was using
cmd.Parameters.Add(pars)
where pars was a an array of SqlParameter. The issue was that I was using the Add() function but I should've used AddRange() instead.
pars
SqlParameter
Add()
AddRange()
cmd.Parameters.AddRange(pars)