I have this question about whether or not it's prefered to set the size of a SqlParamter.
I usually do something like this:
SqlCommand cmd = new SqlCommand(StoredProcName,Connection);
cmd.Parameters.Add("@SomeParamter", SqlDbType.NVarChar).Value = SomeValue;
Is it recommended that I set the size of the paramter like this:
cmd.Parameters.Add("@SomeParamter", SqlDbType.NVarChar, 100).Value = SomeValue;
or it's the same? And also, if the paramter is NText how would I set the size for it?
Thanks in advance