int retval; using (SqlConnection conn = new SqlConnection("...")) using (SqlCommand cmd = new SqlCommand("...)) retval = cmd.ExecuteNonReader()