You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.xml 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?xml version="1.0"?>
  2. <document>
  3. <properties>
  4. <author email="javajedi@users.sf.net">Tim McCune</author>
  5. <title>Java Library for MS Access</title>
  6. </properties>
  7. <body>
  8. <section name="Jackcess">
  9. <p>
  10. Jackcess is a pure Java library for reading from and writing to MS
  11. 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
  12. library, intended for other developers to use to build Java
  13. applications. Jackcess is licensed under the
  14. <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache License</a> (as of version 2.1.0).
  15. Take a look
  16. at our <a href="faq.html">Frequently Asked Questions</a>
  17. for more info.
  18. </p>
  19. <subsection name="Brand New License!">
  20. <p>
  21. Due to the generosity of Health Market Science and the efforts of
  22. the <a href="https://tika.apache.org/">Apache Tika project</a>, the
  23. OpenHMS projects have been relicensed under the <b>Apache License,
  24. Version 2.0</b> (Jackcess versions 2.1.0 and higher).
  25. </p>
  26. </subsection>
  27. <subsection name="All New: Jackcess 2.0">
  28. <p>
  29. <b>New crunchy outside, same yummy filling!</b>
  30. </p>
  31. <p>
  32. The Jackcess project has gotten a facelift. A long-overdue overhaul
  33. of the public API has been completed, and the major version number
  34. of the Jackess APi has been changed to 2.0 in order to indicate the
  35. non-backwards compatible nature of the changes (although the
  36. underlying functionality remains unchanged). Read the
  37. <a href="jackcess-2.html">Upgrade Guide</a> for full details.
  38. </p>
  39. </subsection>
  40. </section>
  41. <section name="Sample code">
  42. <p>
  43. Here are a few snippets of code to whet your appetite. For more
  44. extensive examples, checkout the <a href="cookbook.html">cookbook</a>. And, since Jackcess is heavily
  45. unit tested, you can find even more example code in the <a href="xref-test/index.html">unit tests</a>.
  46. </p>
  47. <ul>
  48. <li>Iterating through the rows of a table:
  49. <source>Table table = DatabaseBuilder.open(new File("my.mdb")).getTable("MyTable");
  50. for(Row row : table) {
  51. System.out.println("Column 'a' has value: " + row.get("a"));
  52. }
  53. </source>
  54. </li>
  55. <li>Searching for a row with a specific column value:
  56. <source>Row row = CursorBuilder.findRow(table, Collections.singletonMap("a", "foo"));
  57. if(row != null) {
  58. System.out.println("Found row where 'a' == 'foo': " + row);
  59. } else {
  60. System.out.println("Could not find row where 'a' == 'foo'");
  61. }
  62. </source>
  63. </li>
  64. <li>Creating a new table and writing data into it:
  65. <source>Database db = DatabaseBuilder.create(Database.FileFormat.V2000, new File("new.mdb"));
  66. Table newTable = new TableBuilder("NewTable")
  67. .addColumn(new ColumnBuilder("a")
  68. .setSQLType(Types.INTEGER))
  69. .addColumn(new ColumnBuilder("b")
  70. .setSQLType(Types.VARCHAR))
  71. .toTable(db);
  72. newTable.addRow(1, "foo");
  73. </source>
  74. </li>
  75. <li>Copying the contents of a JDBC ResultSet (e.g. from an
  76. external database) into a new table:
  77. <source>Database db = DatabaseBuilder.open(new File("my.mdb"));
  78. new ImportUtil.Builder(db, "Imported").importResultSet(resultSet);
  79. db.close();</source>
  80. </li>
  81. <li>Copying the contents of a CSV file into a new table:
  82. <source>Database db = DatabaseBuilder.open(new File("my.mdb"));
  83. new ImportUtil.Builder(db, "Imported2").setDelimiter(",").importFile(new File("my.csv"));
  84. db.close();</source>
  85. </li>
  86. </ul>
  87. </section>
  88. <section name="Other Resources">
  89. <p>
  90. Some other jackcess related projects:
  91. </p>
  92. <ul>
  93. <li>
  94. <a href="https://github.com/brianb/mdbtools">mdbtools</a> - Open Source project
  95. for reading Access files, written in C.
  96. </li>
  97. <li>
  98. <a href="https://jackcessencrypt.sourceforge.io/">Jackcess
  99. Encrypt</a> - Extension library for Jackcess which implements
  100. support for some forms of Microsoft Access and Microsoft Money
  101. encryption.
  102. </li>
  103. <li>
  104. <a href="http://ucanaccess.sourceforge.net/site.html">UCanAccess</a>
  105. - Open Source pure Java JDBC Driver implementation.
  106. </li>
  107. </ul>
  108. </section>
  109. </body>
  110. </document>