I am trying to get data returned from my stored procedure. This is what I have tried and absolutely nothing is coming back.
Stored Proc:
Declare @Submit_
You're not adding the return parameter to the command:
SqlParameter pSub = new SqlParameter("@Sub_ID", SqlDbType.Int);
pSub.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(pSub); // <------------- add to command
conn.Open();
cmd.ExecuteNonQuery();
subid = Convert.ToInt32(cmd.Parameters["pSub"].Value);