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.

faq.fml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <?xml version="1.0"?>
  2. <faqs title="Frequently Asked Questions">
  3. <part id="general">
  4. <title>General</title>
  5. <faq id="linux">
  6. <question>Does this work on Linux/Unix?</question>
  7. <answer>
  8. <p>Yep, Jackcess is pure Java. It will work on any Java Virtual
  9. Machine (1.8+).</p>
  10. </answer>
  11. </faq>
  12. <faq id="formats">
  13. <question>What Access formats does it support?</question>
  14. <answer>
  15. <p>Jackcess supports Access database versions 2000-2016 read/write and
  16. Access 97 read-only.</p>
  17. </answer>
  18. </faq>
  19. <faq id="passwords">
  20. <question>Are password protected databases supported?</question>
  21. <answer>
  22. <p>Basic password protection (Access 2003 or earlier) is merely
  23. software enforced, and Jackcess does not do any password checking
  24. at this point. So, a password protected database can be used the
  25. same as any other.</p>
  26. <p>If a database is actually encrypted, then you will need need an
  27. <a href="#encoding">encoder</a>.</p>
  28. </answer>
  29. </faq>
  30. <faq id="input">
  31. <question>What sorts of input/data validation does Jackcess support?</question>
  32. <answer>
  33. <p>Data validation in Access is controlled via a variety of
  34. mechanisms, not all of which are supported by Jackces. See the
  35. table below for details:</p>
  36. <div class="indented">
  37. <table border="1">
  38. <tr>
  39. <th>Data Validation Type</th>
  40. <th>Support</th>
  41. </tr>
  42. <tr>
  43. <td>Data types (Text, Number, etc.)</td>
  44. <td>Yes</td>
  45. </tr>
  46. <tr>
  47. <td>Field sizes (min/max length, precision, etc.)</td>
  48. <td>Yes</td>
  49. </tr>
  50. <tr>
  51. <td>Unique constraints (indexes)</td>
  52. <td>Yes</td>
  53. </tr>
  54. <tr>
  55. <td>"Enforce Referential Integrity" (aka foreign key
  56. constraints)</td>
  57. <td>On by default, can be selectively disabled.</td>
  58. </tr>
  59. <tr>
  60. <td>Field/Table Properties (Validation rules, Input masks, etc)</td>
  61. <td>Expression evaluation is now optionally available as of 2.2.0
  62. (currently beta). Input masks are not handled.</td>
  63. </tr>
  64. </table>
  65. </div>
  66. </answer>
  67. </faq>
  68. <faq id="mdbtools">
  69. <question>
  70. How is this different from
  71. <a href="http://mdbtools.sf.net">mdbtools</a>?
  72. </question>
  73. <answer>
  74. <p>
  75. We want to give a lot of credit to mdbtools. They have
  76. been around much longer than Jackcess, and, along with
  77. <a href="http://poi.apache.org/">POI</a>,
  78. inspired us that a project like this could be done.
  79. mdbtools is written in C. There is a Java port of it,
  80. but if you've ever read or used a Java port of a C
  81. library, you can appreciate the difference between such
  82. a library and one written from scratch in Java.
  83. </p>
  84. <p>
  85. At the time of this writing, mdbtools could only read
  86. Access databases. Jackcess can also write to them.
  87. According to their web site, "Write support is currently being
  88. worked on and the first cut is expected to be included in the
  89. 0.6 release." This status hasn't changed since we first
  90. started work on Jackcess.
  91. </p>
  92. <p>
  93. The Java port of mdbtools includes an implementation of a small
  94. subset of the JDBC APIs. Jackcess does not currently, but a pure
  95. Java JDBC driver for Access could certainly be written on top of
  96. Jackcess.
  97. </p>
  98. </answer>
  99. </faq>
  100. <faq id="odbc">
  101. <question>
  102. I'm using the JDBC/ODBC bridge. Why should I try Jackcess?
  103. </question>
  104. <answer>
  105. <p>
  106. <ul>
  107. <li>
  108. Portability - With Jackcess, your app has one less dependency on Windows.
  109. </li>
  110. <li>
  111. Speed - We had an app that used the ODBC bridge to write data to an
  112. Access database. When we switched it over to use Jackcess, it was 5 times faster.
  113. </li>
  114. <li>
  115. Stability - With large amounts of data, we found the ODBC brige to be
  116. pretty unreliable.
  117. </li>
  118. <li>
  119. Simplicity - With Jackcess, there is no ODBC configuration to set up.
  120. </li>
  121. <li>
  122. Longevity - The JDBC/ODBC bridge has been removed in Java 8.
  123. </li>
  124. </ul>
  125. </p>
  126. </answer>
  127. </faq>
  128. <faq id="jdk">
  129. <question>What version of the JDK does this require?</question>
  130. <answer>
  131. <p>
  132. Version 3.0+ requires JDK 1.8 or higher. 2.x versions require JDK
  133. 1.5 or higher.
  134. </p>
  135. </answer>
  136. </faq>
  137. <faq id="dependencies">
  138. <question>Why do I get a NoClassDefFoundError?</question>
  139. <answer>
  140. <p>
  141. Probably because you're missing a jar that Jackcess depends on from
  142. your classpath. Take a look at the <a href="dependencies.html">dependencies list</a>. The "compile" and
  143. "runtime" dependencies (which are not marked as "optional") are
  144. necessary for using Jackcess in your application. One great place
  145. to track down these dependencies is in the <a href="http://repo1.maven.org/maven2/">Ibiblio Maven Repository</a>.
  146. </p>
  147. </answer>
  148. </faq>
  149. <faq id="speed">
  150. <question>Why is jackcess so slow for large updates?</question>
  151. <answer>
  152. <p>
  153. In general, the focus of Jackcess is functionality, not speed.
  154. However, one major speed factor is whether or not all writes are
  155. automatically forced to disk. By default, "autoSync" is enabled,
  156. which keeps the database file in a more consistent state, but can be
  157. very slow for large updates. Disabling "autoSync" can dramatically
  158. increase update speed, but exceptions during update can leave the
  159. file in an unusable state (when disabled, you can call <a href="apidocs/com/healthmarketscience/jackcess/Database.html#flush()">Database.flush()</a> manually to force updates to disk). Modifying this option essentially
  160. trades off speed for recoverability.
  161. </p>
  162. <p>
  163. Additionally, <a href ="apidocs/com/healthmarketscience/jackcess/Table.html#addRows(java.util.List)">adding rows in batches</a> instead of one at a time can
  164. increase insert speed.
  165. </p>
  166. <p>
  167. Finally, always make sure you are using the <a href="https://sourceforge.net/projects/jackcess/files/latest/download">latest release</a>, as speed
  168. improvements are happening periodically.
  169. </p>
  170. </answer>
  171. </faq>
  172. <faq id="international">
  173. <question>Why am I getting an IOException with the message "unmapped
  174. string index value"?</question>
  175. <answer>
  176. <p>
  177. Update: As of the 1.1.21 release, the <u>text index handling
  178. supports the entire Basic Multilingual Plane 0</u> (i.e. any unicode
  179. character 0x0000-0xFFFF). Consequently table names can (as of this
  180. release) contain any character in this character set.
  181. </p>
  182. </answer>
  183. </faq>
  184. <faq id="jdbc">
  185. <question>Does Jackcess provide a JDBC driver for Microsoft Access databases?</question>
  186. <answer>
  187. Unfortunately, no. The Jackcess API is a direct implementation of the
  188. features available for interacting with an Access database. There is
  189. currently no implementation of the JDBC API included with the Jackcess
  190. library. While this library would be a great foundation for a JDBC
  191. driver, implementing the JDBC API is currently outside the scope of
  192. this project. There have been a few attempts to use Jackcess to build
  193. JDBC drivers for Access databases, but most of the projects have not
  194. progressed very far before becoming inactive. The <a href="http://ucanaccess.sourceforge.net/site.html">UCanAccess project</a>,
  195. however, is a currently active open source project which provides a
  196. JDBC driver built on top of Jackcess.
  197. </answer>
  198. </faq>
  199. <faq id="query">
  200. <question>Can Jackcess execute SQL queries?</question>
  201. <answer>
  202. As of the 1.1.19 release, Jackcess has the ability to <i>read</i> the
  203. Queries saved in an Access database (i.e. interpret the data stored in
  204. the system Queries table). However, Jackcess does not have the
  205. ability to <i>execute</i> these Queries. See <a href="#jdbc">this question</a>
  206. for more details regarding JDBC and Jackcess.
  207. </answer>
  208. </faq>
  209. <faq id="android">
  210. <question>Why do I get an OutOfMemoryError or NullPointerException when
  211. creating a new database on the Android platform?</question>
  212. <answer>
  213. <p>
  214. There are 2 issues which need to be dealt with when using Jackcess
  215. on the Android platform. The first is that non-class resources need
  216. to be in a special location. The second is that the nio
  217. implementation has some "weaknesses".
  218. </p>
  219. <p>
  220. The following steps will make Jackcess compatible with the Android
  221. platform.
  222. <ul>
  223. <li>Set the system property "com.healthmarketscience.jackcess.brokenNio=true"</li>
  224. <li>Set the system property "com.healthmarketscience.jackcess.resourcePath=/res/raw/"</li>
  225. <li>Copy the *.txt, *.mdb, and *.accdb files from the
  226. "com/healthmarketscience/jackcess/" directory in the Jackcess
  227. jar to the "/res/raw" Android application directory.</li>
  228. <li>Before executing any Jackcess code, set the current Thread's
  229. context classloader,
  230. e.g. "Thread.currentThread().setContextClassLoader(Database.class.getClassLoader())".</li>
  231. </ul>
  232. </p>
  233. </answer>
  234. </faq>
  235. <faq id="encoding">
  236. <question>Why do I get an UnsupportedCodecException with the message
  237. "Decoding not supported"?</question>
  238. <answer>
  239. This exception indicates that the Access database you are attempting
  240. to open is "encrypted" using one of the various forms of encryption
  241. utilized by Microsoft. Due to various constraints, the Jackcess
  242. project does not directly support decrypting Access databases, but
  243. does, however, support plugging in encryption support using a custom
  244. <a href="apidocs/com/healthmarketscience/jackcess/CodecProvider.html">CodecProvider</a>.
  245. The separate <a href="https://jackcessencrypt.sourceforge.io/">Jackcess Encrypt
  246. project</a> contains the <a href="https://jackcessencrypt.sourceforge.io/apidocs/com/healthmarketscience/jackcess/CryptCodecProvider.html">CryptCodecProvider</a>,
  247. which implements the Jackess CodecProvider interface and supports
  248. some forms of Access database encryption.
  249. </answer>
  250. </faq>
  251. <faq id="bugs">
  252. <question>It doesn't work!</question>
  253. <answer>
  254. <p>
  255. Ok, that wasn't a question, but we'll try to respond anyway. :) As
  256. you might imagine, it's kind of hard to test, simply by its nature.
  257. There are bugs that we are aware of, and certainly many more that we
  258. are not. If you find what looks like a bug, please <a
  259. href="https://sourceforge.net/p/jackcess/bugs/">report
  260. it.</a> Even better, fix it, and <a
  261. href="https://sourceforge.net/p/jackcess/patches/">submit
  262. a patch.</a>
  263. </p>
  264. </answer>
  265. </faq>
  266. </part>
  267. </faqs>