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
136
137
138
139
140
|
<?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 part of the <a href="https://openhms.sourceforge.io/">OpenHMS</a> project from <a href="http://www.healthmarketscience.com/">Health Market Science, Inc.</a>. 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).
Take a look
at our <a href="faq.html">Frequently Asked Questions</a>
for more info.
</p>
<subsection name="Java 8+ Support (TBD)">
<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>
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! Experimental
support for expression evaluation has finally landed in the 2.2.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>
<subsection name="All New: Jackcess 2.0 (2013-08-26)">
<p>
<b>New crunchy outside, same yummy filling!</b>
</p>
<p>
The Jackcess project has gotten a facelift. A long-overdue overhaul
of the public API has been completed, and the major version number
of the Jackess APi has been changed to 2.0 in order to indicate the
non-backwards compatible nature of the changes (although the
underlying functionality remains unchanged). Read the
<a href="jackcess-2.html">Upgrade Guide</a> for full details.
</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")
.setSQLType(Types.INTEGER))
.addColumn(new ColumnBuilder("b")
.setSQLType(Types.VARCHAR))
.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>
|