@@ -0,0 +1,1905 @@
+/*Programmer: Kristoffer Larson%0A *Date: April 25, 2014%0A *%0A *Description: Connect to a DB and retrieve a table.%0A *%0A */%0A%0Aimport java.sql.*;%0A%0Apublic class DBSelectTable%0A%7B%0A   Connection c = null;%0A   Statement stmt = null;%0A   %0A   public DBSelectTable()%0A   %7B%0A      //Connection c = null;%0A      // try %0A//       %7B%0A//          Class.forName(%22org.sqlite.JDBC%22);%0A//          c = DriverManager.getConnection(%22jdbc:sqlite:test.db%22);%0A//       %7D %0A//       catch ( Exception e ) %0A//       %7B%0A//          System.err.println( e.getClass().getName() + %22: %22 + e.getMessage() );%0A//          System.exit(0);%0A//       %7D%0A      //System.out.println(%22Opened database successfully%22);%0A      select();%0A   %7D%0A   %0A   public void select()%0A   %7B%0A      try %7B%0A      Class.forName(%22org.sqlite.JDBC%22);%0A      c = DriverManager.getConnection(%22jdbc:sqlite:test.db%22);%0A      c.setAutoCommit(false);%0A      System.out.println(%22Opened database successfully%22);%0A%0A      stmt = c.createStatement();%0A      ResultSet rs = stmt.executeQuery( %22SELECT * FROM COMPANY;%22 );%0A      while ( rs.next() ) %7B%0A         int id = rs.getInt(%22id%22);%0A         String  name = rs.getString(%22name%22);%0A         int age  = rs.getInt(%22age%22);%0A         String  address = rs.getString(%22address%22);%0A         float salary = rs.getFloat(%22salary%22);%0A         System.out.println( %22ID = %22 + id );%0A         System.out.println( %22NAME = %22 + name );%0A         System.out.println( %22AGE = %22 + age );%0A         System.out.println( %22ADDRESS = %22 + address );%0A         System.out.println( %22SALARY = %22 + salary );%0A         System.out.println();%0A      %7D%0A      rs.close();%0A      stmt.close();%0A      c.close();%0A    %7D catch ( Exception e ) %7B%0A      System.err.println( e.getClass().getName() + %22: %22 + e.getMessage() );%0A      System.exit(0);%0A    %7D%0A    System.out.println(%22Operation done successfully%22);%0A   %7D%0A   %0A   public static void main(String%5B%5D args)%0A   %7B%0A      DBSelectTable app = new DBSelectTable();%0A   %7D%0A%0A%7D%0A

Create DBSelectTable.java