title: "Type Mismatch: Cannot Convert from int to ResultSet"
body: <p>I am using <a href="http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html" rel="nofollow">JCBC API</a> to connect to mySQL server in order to perform some SQL queries (create tables, delete rows, etc.).</p>
  
  <p>However, I receive a "Type Mismatch: Cannot Convert from int to ResultSet" error in the following function:</p>
  
  <pre><code>private static void deleteUnpopularArtists(Statement statement, int min_rank) throws SQLException {
  
      String rank = Integer.toString(min_rank);
      ResultSet resultSet = statement.executeUpdate("DELETE FROM record_artist WHERE high_chart_pos &lt; " + rank + ";");
  
  }
  </code></pre>
  
  <p>I have tried to use <code>String.valueOf(min_rank);</code> and <code>int rank = min_rank + "";</code></p>
  
  <p>So my question is, why am I getting this error? What can I do to fix it?</p>