title: No return data from PreparedStatement query
body: <p>I am trying to do a SELECT using <code>PreparedStatement</code>, but not getting any results back, despite the data being present.  If I use <code>Statement</code> instead, I get the desired results, so not sure why I don't get anything with the <code>PreparedStatement</code>.<br>
  Any ideas?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>String species = "Snail";
  PreparedStatement preparedStatement = con.prepareStatement("Select * from lifeforms where species=?",PreparedStatement.RETURN_GENERATED_KEYS);
  preparedStatement.setString(1, species);
  preparedStatement.execute();
  ResultSet resultSet = preparedStatement.getGeneratedKeys();
  </code></pre>
  
  <p>Also - I have tried just </p>
  
  <pre><code>resultSet = preparedStatement.execute();
  </code></pre>
  
  <p>But this won't compile, saying I must change <code>resultSet</code> to expect a boolean value.</p>
  
  <p>Any insights into this would be greatly appreciated.</p>
  
  <p>Sorry if this is something obvious, but I have read the docs until I am almost unconscious, and I'm only just learning java.</p>