title: No results found when querying derby database from program
body: <p>I am new on working with java(Embedded) databases and derby. I am creating a java application in netbeans ide 8.0. I was able to set up the database and insert data on it. I tried to select rows on one of my db's tables and as expected I saw the rows i inserted. But when i try to select from my code/project, it returns no result. The connection is successfully established as per the logs and no errors encountered. I don't know what to do anymore. :(</p>
  
  <p>Here's my code:</p>
  
  <pre><code>try { 
      Connection con = DriverManager.getConnection("jdbc:derby:AccountingDB"); /* Note use' / 'and not' \'  The url above will be different in your system*/
      PreparedStatement stmt = con.prepareStatement("SELECT * from app.companies");
      ResultSet rs = stmt.executeQuery();
          if(rs.next())
          {
              companySet.addItem(rs.getString("name"));
              //System.out.println("Id : "+rs.getInt(1) +" "+" Fruitname :"+rs.getString(2));
          }
          else
          {
              System.out.println("No word matching in database");
          }
      } catch (SQLException err) {
          System.out.println(err.getMessage()+ "No matching word in database");
      }
  </code></pre>
  
  <p>i did this on the customize code of my jComboBox. </p>
  
  <p>thanks. I hope I explained my problem well. :(</p>