Code example for Statement

Methods: addBatch, executeBatch

0
	public void createResultIndices() throws SQLException { 
		// Statement statement = Database.getInstance().getNewStatement(); 
		Statement statement = connection.createStatement();
		try { 
			statement
					.addBatch("CREATE INDEX  bt_result_index ON backtrack_results (id_analyses);");
			statement
					.addBatch("CREATE INDEX  h_result_index ON heuristic_results (id_analyses);");// IF
																									// NOT 
																									// EXISTS 
			statement.executeBatch();
		} catch (SQLException e) {
			if (e.getErrorCode() != 1061)// System.out.println("ERROR: "+e.getErrorCode()+e.getMessage());
				throw (e);
		} 
 
	} 
 
	// ############ Old Layout ######################### 
 
	public void createAppTable() throws SQLException {