Jackcess is a pure Java library for reading from and writing to MS Access databases (currently supporting versions 2000-2007). It is part of the OpenHMS project from Health Market Science, Inc.. It is not an application. There is no GUI. It's a library, intended for other developers to use to build Java applications. Jackcess is licensed under the GNU Lesser General Public License. Take a look at our Frequently Asked Questions for more info.
System.out.println(Database.open(new File("my.mdb")).getTable("MyTable").display());
Table table = Database.open(new File("my.mdb")).getTable("MyTable");
for(Map<String, Object> row : table) {
System.out.println("Column 'a' has value: " + row.get("a"));
}
Map<String, Object> row = Cursor.findRow(table, Collections.singletonMap("a", "foo"));
if(row != null) {
System.out.println("Found row where 'a' == 'foo': " + row);
} else {
System.out.println("Could not find row where 'a' == 'foo'");
}
Database db = Database.create(new File("new.mdb"));
Table newTable = new TableBuilder("NewTable")
.addColumn(new ColumnBuilder("a")
.setSQLType(Types.INTEGER)
.toColumn())
.addColumn(new ColumnBuilder("b")
.setSQLType(Types.VARCHAR)
.toColumn())
.toTable(db);
newTable.addRow(1, "foo");
Database.open(new File("my.mdb")).copyTable("Imported", resultSet);Database.open(new File("my.mdb")).importFile("Imported2", new File("my.csv"), ",");