I am working on a social network, one of my procedures returns a VARCHAR output. So this is what I wrote:
SqlParameter job1 = cmd2.Parameters.Add("@job", SqlDbType.VarChar);
job1.Direction = ParameterDirection.Output;
However this error comes up:
String[1]: the Size property has an invalid size of 0.
int
or other parameter type, you should specify the DbType of the SqlParameter object. I wasn't doing that and received this same error message. – Mychael