public Batch addBatch(Batch batch) throws SQLException {
		  PreparedStatement stmt = null;
		  Statement keyStmt = null;
		  ResultSet keyRS = null;
		  Batch returnBatch = null;
		  try {
		    String sql = "INSERT INTO batches (project_id, image_file) VALUES(?, ?)";
		    stmt = db.getConnection().prepareStatement(sql);
		    stmt.setInt(1, batch.getProjectId());
		    stmt.setString(2, batch.getFile());
		    if (stmt.executeUpdate() == 1) {
		    	keyStmt = db.getConnection().createStatement();
		    	keyRS = keyStmt.executeQuery("SELECT last_insert_rowid()");
		    	keyRS.next();
		    	int batchId = keyRS.getInt(1);
		    	returnBatch = new Batch(batchId, batch.getProjectId(), batch.getFile(), batch.getAccessUserId());
		    } else {
		      System.out.println("Insert batch failed");
		    }
		  } catch (SQLException e) {
		    e.printStackTrace();
		  } finally {
		    if (stmt != null) stmt.close();
		    if (keyRS != null) keyRS.close();
		    if (keyStmt != null) keyStmt.close();
		  }
		  return returnBatch;
		}