Return value parameter returns null
Tuesday, August 29th, 2006
I was really confused this morning. I was executing a stored proc that returned a single row of data, and a return value. However, the return value was always null - even though the stored proc ALWAYS returned a return value. The code was domething like this:
PLAIN TEXT
C#:
SqlParameter retval = new SqlParameter("@RETURN_VALUE", SqlDbType.Int);
retval.Direction = ParameterDirection.ReturnValue;
command1.Parameters.Add(retval);
using ... read more
