title: JAVA Derby, problems viewing the data entered in the table
body: <p>Good night guys!</p>
  
  <p>I created a connection to the Derby in java , I insert data in the table , but when I run the code to display the data in the table with System.out.printl , Java gives me a message connection Ok ! but nothing to show me the data on the console , I'm using the clause SELECT * FROM ... I'll post the code , and if they have some more example code, or choose to send another code will be well accepted , look my code :</p>
  
  <pre><code>package tests ;
  import java.sql . * ;
  
   public class AcessoBanco {
  
      public static void main ( String [ ] args ) {
  
      
          Connection con = null;
  
      try {
  
        con = DriverManager.getConnection ( " jdbc : derby : database " , " Ramom " , " banco123 " ) ;
  
        Statement sta = con.createStatement ( ) ;
  
  
  // Getting the data back
  
  
        ResultSet res = sta.executeQuery ( " SELECT * FROM APP.TablePTBR " ) ;
   
  
        while ( res.next ()) {
  
  
  
  
  // THIS LINE(SYSTEM.OUT...) DOES NOT SEEM TO BE WORKING, PLEASE take a look ! 
  
           System.out.println ( res.getInt ("code") + " , " + res.getString ( "user " ) ) ;
  
           
        }
  
        res.close ();
  
  
        sta.close ();
  
  
        con.close ();
  
  
      } Catch ( Exception e ) {
  
  
  
  
  
  
        System.err.println ( " Exception : " + e.getMessage ( ) ) ;
  
  
      }
  
  
    }
  
  
  }
  </code></pre>
  
  <p>My problem is not connecting, but the problem is SELECT and view table data in JAVA console with System.out.println and when I run the command "Insert Into ..." java does not show me any connection error and no error insertion, when I check in the GUI in Derby table, there is no data there..
  Thank you guys!</p>