@@ -0,0 +1,1931 @@
+/*Programmer: Kristoffer Larson%0A *Date: April 24, 2014%0A *%0A *Description: Connect to a DB and add to a table.%0A *%0A */%0A%0Aimport java.sql.*;%0A%0Apublic class DBInsertTable%0A%7B%0A   Connection c = null;%0A   Statement stmt = null;%0A   %0A   public DBInsertTable()%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      insert();%0A   %7D%0A   %0A   public void insert()%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      String sql = %22INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) %22 +%0A                   %22VALUES (1, 'Paul', 32, 'California', 20000.00 );%22; %0A      stmt.executeUpdate(sql);%0A%0A      sql = %22INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) %22 +%0A            %22VALUES (2, 'Allen', 25, 'Texas', 15000.00 );%22; %0A      stmt.executeUpdate(sql);%0A%0A      sql = %22INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) %22 +%0A            %22VALUES (3, 'Teddy', 23, 'Norway', 20000.00 );%22; %0A      stmt.executeUpdate(sql);%0A%0A      sql = %22INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) %22 +%0A            %22VALUES (4, 'Mark', 25, 'Rich-Mond ', 65000.00 );%22; %0A      stmt.executeUpdate(sql);%0A%0A      stmt.close();%0A      c.commit();%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(%22Records created successfully%22);%0A   %7D%0A   %0A   public static void main(String%5B%5D args)%0A   %7B%0A      DBInsertTable app = new DBInsertTable();%0A   %7D%0A%0A%7D%0A

Create DBInsertTable.java