title: Why am I getting this error: E/ERROR: The executeQuery method must return a result set.?
body: <p>I'm trying to connect my project with an SQL-Server database. But I always get this error E/ERROR: The <code>executeQuery</code> method must return a result set.</p>
  
  <pre><code>Class.forName("net.sourceforge.jtds.jdbc.Driver");
          String username = "un";
          String password = "pass";
  
          conn = DriverManager.getConnection("jdbc:jtds:sqlserver://ip/db;user=" + username + ";password=" + password);
  
          Log.w("Connection","open");
  
          String sql = "INSERT INTO TABLE" +
                  "(Cliente, NomePessoa, Email, NivelSatisfacao, Nota) " +
                  "VALUES ('" + informacao.getNomeCliente() + "', '" + informacao.getNome() + "', '" + informacao.getEmail() + "', '" + informacao.getSatisfacao() + "', '" + informacao.getNota() + "') ";
          Statement stmt = conn.createStatement();
          ResultSet rSet = stmt.executeQuery(sql); // error here
  </code></pre>
  
  <p>I tried to change <code>stmt.executeQuery</code> to <code>stmt.executeUpdate</code>, but it underlines it red, and says that the output is <code>int</code>, so it is incompatible.</p>