sql.Parameters.Add("@oRetVal", SqlDbType.Int).Value = 0; sql.Parameters["@oRetVal"].Direction = ParameterDirection.Output;
int retVal; retVal = (int)sql.Parameters["@oRetVal"].Value;