1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
<?xml version="1.0"?>
<document>
<properties>
<author email="javajedi@users.sf.net">Tim McCune</author>
<title>Java Library for MS Access</title>
</properties>
<body>
<section name="Jackcess">
<p>
Jackcess is a pure Java library for reading from and writing to MS
Access databases (currently supporting versions 2000-2016). 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 <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache License</a>
(as of version 2.1.0) and currently requires Java 8+ (as of the 3.0.0
release) Take a look at our <a href="faq.html">Frequently Asked
Questions</a> for more info.
</p>
<subsection name="Java 9+ Compatibility (2021-01-20)">
<p>
While Jackcess <i>still only requires Java 8+</i>, as of the 4.0.0
release it now includes an Automatic-Module-Name of
<code>com.healthmarketscience.jackcess</code> in its manifest. This
allows it to be used safely in the module path for Java 9+ projects.
</p>
<p>
This release is binary compatible with the 3.x release series.
</p>
</subsection>
<subsection name="Java 8+ Support (2019-02-08)">
<p>
Jackcess now requires Java 8+ as of the 3.0.0 release. All third
party dependencies have been updated to the latest versions.
Jackcess now supports Java 8+ data types like
<code>LocalDateTime</code> and <code>Path</code>. Databases can now
optionally return <code>Date</code> values (legacy, backwards
compatible) or <code>LocalDateTime</code> values. See <a href="apidocs/com/healthmarketscience/jackcess/DateTimeType.html">DateTimeType</a>
and the <a href="jackcess-3.html">Upgrade Guide</a> for more details
</p>
</subsection>
<subsection name="Expression Evaluation (2018-09-08)">
<p>
Have you ever wished that Jackcess could handle field "default
values" (or other expressions)? Wish no longer! Expression
evaluation is now enabled by default as of the 3.5.0 release. See
the <a href="apidocs/com/healthmarketscience/jackcess/expr/package-summary.html#package_description">expression package</a> javadocs for more details.
</p>
</subsection>
<subsection name="Brand New License! (2015-04-16)">
<p>
Due to the generosity of Health Market Science and the efforts of
the <a href="https://tika.apache.org/">Apache Tika project</a>, the
OpenHMS projects have been relicensed under the <b>Apache License,
Version 2.0</b> (Jackcess versions 2.1.0 and higher).
</p>
</subsection>
</section>
<section name="Sample code">
<p>
Here are a few snippets of code to whet your appetite. For more
extensive examples, checkout the <a href="cookbook.html">cookbook</a>. And, since Jackcess is heavily
unit tested, you can find even more example code in the <a href="xref-test/index.html">unit tests</a>.
</p>
<ul>
<li>Iterating through the rows of a table:
<source>Table table = DatabaseBuilder.open(new File("my.mdb")).getTable("MyTable");
for(Row row : table) {
System.out.println("Column 'a' has value: " + row.get("a"));
}
</source>
</li>
<li>Searching for a row with a specific column value:
<source>Row row = CursorBuilder.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'");
}
</source>
</li>
<li>Creating a new table and writing data into it:
<source>Database db = DatabaseBuilder.create(Database.FileFormat.V2000, new File("new.mdb"));
Table newTable = new TableBuilder("NewTable")
.addColumn(new ColumnBuilder("a", DataType.LONG))
.addColumn(new ColumnBuilder("b", DataType.TEXT))
.toTable(db);
newTable.addRow(1, "foo");
</source>
</li>
<li>Copying the contents of a JDBC ResultSet (e.g. from an
external database) into a new table:
<source>Database db = DatabaseBuilder.open(new File("my.mdb"));
new ImportUtil.Builder(db, "Imported").importResultSet(resultSet);
db.close();</source>
</li>
<li>Copying the contents of a CSV file into a new table:
<source>Database db = DatabaseBuilder.open(new File("my.mdb"));
new ImportUtil.Builder(db, "Imported2").setDelimiter(",").importFile(new File("my.csv"));
db.close();</source>
</li>
</ul>
</section>
<section name="Other Resources">
<p>
Some other jackcess related projects:
</p>
<ul>
<li>
<a href="https://github.com/brianb/mdbtools">mdbtools</a> - Open Source project
for reading Access files, written in C.
</li>
<li>
<a href="https://jackcessencrypt.sourceforge.io/">Jackcess
Encrypt</a> - Extension library for Jackcess which implements
support for some forms of Microsoft Access and Microsoft Money
encryption.
</li>
<li>
<a href="http://ucanaccess.sourceforge.net/site.html">UCanAccess</a>
- Open Source pure Java JDBC Driver implementation.
</li>
</ul>
</section>
</body>
</document>
|