title: resultSet returning false when it should return true
body: <p>I am trying to retrieve data from Oracle database in Eclipse using JDBC. Even though the table has entries present in it and the the SQL query runs is Oracle<a href="https://i.stack.imgur.com/CygCx.png" rel="nofollow noreferrer">1</a>, result Set returns false and never enters the loop.
  Below is the code snippet:</p>
  
  <pre><code>public List&lt;InvoiceModel&gt; getProcDets() throws SQLException {   
      List&lt;InvoiceModel&gt; procDets = new ArrayList&lt;InvoiceModel&gt;();
  
      String sql = "SELECT * FROM PROC_DETAILS";
      connect();
  
      PreparedStatement statement = jdbcConnection.prepareStatement(sql);
      ResultSet resultSet = statement.executeQuery();
  
      while(resultSet.next()) {
          String adid=resultSet.getString("ADID");
          String fName=resultSet.getString("FULL_NAME");
          String email=resultSet.getString("EMAIL");
  
          InvoiceModel Invoice = new InvoiceModel(fName, adid, email);
          procDets.add(Invoice);
      }
  
      resultSet.close();
      statement.close();
      disconnect();
      return procDets;   
  }
  </code></pre>
  
  <p>Any help/suggestion/improvement is appreciated!</p>