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 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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.5+).</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>No (but Jackcess does provide access to the Properties)</td>
  62. </tr>
  63. </table>
  64. </div>
  65. </answer>
  66. </faq>
  67. <faq id="mdbtools">
  68. <question>
  69. How is this different from
  70. <a href="http://mdbtools.sf.net">mdbtools</a>?
  71. </question>
  72. <answer>
  73. <p>
  74. We want to give a lot of credit to mdbtools. They have
  75. been around much longer than Jackcess, and, along with
  76. <a href="http://poi.apache.org/">POI</a>,
  77. inspired us that a project like this could be done.
  78. mdbtools is written in C. There is a Java port of it,
  79. but if you've ever read or used a Java port of a C
  80. library, you can appreciate the difference between such
  81. a library and one written from scratch in Java.
  82. </p>
  83. <p>
  84. At the time of this writing, mdbtools could only read
  85. Access databases. Jackcess can also write to them.
  86. According to their web site, "Write support is currently being
  87. worked on and the first cut is expected to be included in the
  88. 0.6 release." This status hasn't changed since we first
  89. started work on Jackcess.
  90. </p>
  91. <p>
  92. The Java port of mdbtools includes an implementation of a small
  93. subset of the JDBC APIs. Jackcess does not currently, but a pure
  94. Java JDBC driver for Access could certainly be written on top of
  95. Jackcess.
  96. </p>
  97. </answer>
  98. </faq>
  99. <faq id="odbc">
  100. <question>
  101. I'm using the JDBC/ODBC bridge. Why should I try Jackcess?
  102. </question>
  103. <answer>
  104. <p>
  105. <ul>
  106. <li>
  107. Portability - With Jackcess, your app has one less dependency on Windows.
  108. </li>
  109. <li>
  110. Speed - We had an app that used the ODBC bridge to write data to an
  111. Access database. When we switched it over to use Jackcess, it was 5 times faster.
  112. </li>
  113. <li>
  114. Stability - With large amounts of data, we found the ODBC brige to be
  115. pretty unreliable.
  116. </li>
  117. <li>
  118. Simplicity - With Jackcess, there is no ODBC configuration to set up.
  119. </li>
  120. <li>
  121. Longevity - The JDBC/ODBC bridge has been removed in Java 8.
  122. </li>
  123. </ul>
  124. </p>
  125. </answer>
  126. </faq>
  127. <faq id="jdk">
  128. <question>What version of the JDK does this require?</question>
  129. <answer>
  130. <p>
  131. Version 1.0 requires JDK 1.4 or higher. The version in SVN trunk
  132. and all future releases will require JDK 1.5 or higher.
  133. </p>
  134. <p>
  135. However, some users have contributed patches to make later versions
  136. compatible with JDK 1.4. Please check the contributions/ directory
  137. in the source repository for any such patches. Note that any code
  138. in this directory is untested and unsupported, so please use at your
  139. own risk and do not file bugs based on that code.
  140. </p>
  141. </answer>
  142. </faq>
  143. <faq id="dependencies">
  144. <question>Why do I get a NoClassDefFoundError?</question>
  145. <answer>
  146. <p>
  147. Probably because you're missing a jar that Jackcess depends on from
  148. your classpath. Take a look at the <a href="dependencies.html">dependencies list</a>. The "compile" and
  149. "runtime" dependencies (which are not marked as "optional") are
  150. necessary for using Jackcess in your application. One great place
  151. to track down these dependencies is in the <a href="http://repo1.maven.org/maven2/">Ibiblio Maven Repository</a>.
  152. </p>
  153. </answer>
  154. </faq>
  155. <faq id="speed">
  156. <question>Why is jackcess so slow for large updates?</question>
  157. <answer>
  158. <p>
  159. In general, the focus of Jackcess is functionality, not speed.
  160. However, one major speed factor is whether or not all writes are
  161. automatically forced to disk. By default, "autoSync" is enabled,
  162. which keeps the database file in a more consistent state, but can be
  163. very slow for large updates. Disabling "autoSync" can dramatically
  164. increase update speed, but exceptions during update can leave the
  165. 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
  166. trades off speed for recoverability.
  167. </p>
  168. <p>
  169. 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
  170. increase insert speed.
  171. </p>
  172. <p>
  173. Finally, always make sure you are using the <a href="https://sourceforge.net/projects/jackcess/files/latest/download">latest release</a>, as speed
  174. improvements are happening periodically.
  175. </p>
  176. </answer>
  177. </faq>
  178. <faq id="international">
  179. <question>Why am I getting an IOException with the message "unmapped
  180. string index value"?</question>
  181. <answer>
  182. <p>
  183. Update: As of the 1.1.21 release, the <u>text index handling
  184. supports the entire Basic Multilingual Plane 0</u> (i.e. any unicode
  185. character 0x0000-0xFFFF). Consequently table names can (as of this
  186. release) contain any character in this character set. Therefore,
  187. the rest of this answer should no longer be an issue, but keeping it
  188. here for reference.
  189. </p>
  190. <p>
  191. Legacy: As of the 1.1.13 release, the text index handling supports
  192. the entire ISO-8859-1 character set. Consequently table names can
  193. (as of this release) contain any character in this character set.
  194. </p>
  195. <p>
  196. Legacy: Jackcess cannot currently update a text column index with
  197. values which contain non-ascii characters. This situation often
  198. arises when tables are created with names which contain
  199. international characters. Access stores the table names in another
  200. table which has an index on the table name column. The index
  201. encoding is not simple to reverse engineer, so it is not likely that
  202. Jackcess will support this anytime soon.
  203. </p>
  204. <p>
  205. Some suggestions (for older releases):
  206. </p>
  207. <ul>
  208. <li>Use only ascii (or ISO-8859-1 as of 1.1.13) characters in table
  209. names if at all possible</li>
  210. <li>If tables with international characters are required, create the
  211. tables using Access, then update the tables using jackcess.</li>
  212. <li>For indexes on user created tables, populate the table without
  213. indexes in jackcess, then add the index using Access.</li>
  214. </ul>
  215. </answer>
  216. </faq>
  217. <faq id="jdbc">
  218. <question>Does Jackcess provide a JDBC driver for Microsoft Access databases?</question>
  219. <answer>
  220. Unfortunately, no. The Jackcess API is a direct implementation of the
  221. features available for interacting with an Access database. There is
  222. currently no implementation of the JDBC API included with the Jackcess
  223. library. While this library would be a great foundation for a JDBC
  224. driver, implementing the JDBC API is currently outside the scope of
  225. this project. There have been a few attempts to use Jackcess to build
  226. JDBC drivers for Access databases, but most of the projects have not
  227. progressed very far before becoming inactive. The <a href="http://ucanaccess.sourceforge.net/site.html">UCanAccess project</a>,
  228. however, is a currently active open source project which provides a
  229. JDBC driver built on top of Jackcess.
  230. </answer>
  231. </faq>
  232. <faq id="query">
  233. <question>Can Jackcess execute SQL queries?</question>
  234. <answer>
  235. As of the 1.1.19 release, Jackcess has the ability to <i>read</i> the
  236. Queries saved in an Access database (i.e. interpret the data stored in
  237. the system Queries table). However, Jackcess does not have the
  238. ability to <i>execute</i> these Queries. See <a href="#jdbc">this question</a>
  239. for more details regarding JDBC and Jackcess.
  240. </answer>
  241. </faq>
  242. <faq id="android">
  243. <question>Why do I get an OutOfMemoryError or NullPointerException when
  244. creating a new database on the Android platform?</question>
  245. <answer>
  246. <p>
  247. There are 2 issues which need to be dealt with when using Jackcess
  248. on the Android platform. The first is that non-class resources need
  249. to be in a special location. The second is that the nio
  250. implementation has some "weaknesses".
  251. </p>
  252. <p>
  253. The following steps will make Jackcess compatible with the Android
  254. platform.
  255. <ul>
  256. <li>Set the system property "com.healthmarketscience.jackcess.brokenNio=true"</li>
  257. <li>Set the system property "com.healthmarketscience.jackcess.resourcePath=/res/raw/"</li>
  258. <li>Copy the *.txt, *.mdb, and *.accdb files from the
  259. "com/healthmarketscience/jackcess/" directory in the Jackcess
  260. jar to the "/res/raw" Android application directory.</li>
  261. <li>Before executing any Jackcess code, set the current Thread's
  262. context classloader,
  263. e.g. "Thread.currentThread().setContextClassLoader(Database.class.getClassLoader())".</li>
  264. </ul>
  265. </p>
  266. </answer>
  267. </faq>
  268. <faq id="encoding">
  269. <question>Why do I get an UnsupportedCodecException with the message
  270. "Decoding not supported"?</question>
  271. <answer>
  272. This exception indicates that the Access database you are attempting
  273. to open is "encrypted" using one of the various forms of encryption
  274. utilized by Microsoft. Due to various constraints, the Jackcess
  275. project does not directly support decrypting Access databases, but
  276. does, however, support plugging in encryption support using a custom
  277. <a href="apidocs/com/healthmarketscience/jackcess/CodecProvider.html">CodecProvider</a>.
  278. The separate <a href="https://jackcessencrypt.sourceforge.io/">Jackcess Encrypt
  279. project</a> contains the <a href="https://jackcessencrypt.sourceforge.io/apidocs/com/healthmarketscience/jackcess/CryptCodecProvider.html">CryptCodecProvider</a>,
  280. which implements the Jackess CodecProvider interface and supports
  281. some forms of Access database encryption.
  282. </answer>
  283. </faq>
  284. <faq id="hms">
  285. <question>Who is Health Market Science?</question>
  286. <answer>
  287. <p>
  288. HMS is a small company located in suburban Philadelphia.
  289. Using proprietary matching and consolidation software,
  290. HMS scientifically manufactures the most comprehensive
  291. and accurate healthcare data sets in the market today.
  292. </p>
  293. </answer>
  294. </faq>
  295. <faq id="bugs">
  296. <question>It doesn't work!</question>
  297. <answer>
  298. <p>
  299. Ok, that wasn't a question, but we'll try to respond anyway. :) As
  300. you might imagine, it's kind of hard to test, simply by its nature.
  301. There are bugs that we are aware of, and certainly many more that we
  302. are not. If you find what looks like a bug, please <a
  303. href="https://sourceforge.net/p/jackcess/bugs/">report
  304. it.</a> Even better, fix it, and <a
  305. href="https://sourceforge.net/p/jackcess/patches/">submit
  306. a patch.</a>
  307. </p>
  308. </answer>
  309. </faq>
  310. </part>
  311. </faqs>