-1

How can I read calculated fields with UCanAccess or Jackcess (or any Java library that also works on Linux)? I don't care if I can't get the result straightaway, I'll settle for just getting only the function if need be.

For simplicity, we'll assume a simple table with two columns: id, and idx2 which returns [id]*2. I want to either query the value (1,2) or anything related to the function.

Gord Thompson
  • 98,607
  • 26
  • 164
  • 342
  • Have you tried anything? If so please create a http://stackoverflow.com/help/mcve. If not, please try something first and if you run into problems ask us about it. – DanielBarbarian Jun 23 '14 at 11:52
  • have you tried anything? Go to their website, try a quick demo http://ucanaccess.sourceforge.net/site.html and see if it works. I'm not interested in the opinions of anyone who hasn't used these libraries. Those who have used it know exactly what the problem is. – user3037710 Jun 23 '14 at 11:58

1 Answers1

2

Update 2014-10-02

UCanAccess v2.0.9.1 has added support for calculated fields. We can now read their values directly, and calculated fields are updated in the database as part of INSERT and UPDATE operations.


Previous answer:

As you are probably aware, UCanAccess uses Jackcess to read/write the Access database so it is really a question of whether Jackcess can read a Calculated field. Unfortunately, it cannot (or at least it couldn't do so the last time I checked, which was sometime in the last few months).

On Windows you would have the option of using the JDBC-ODBC Bridge (with all its warts) under Java 7. However, I'm not aware of any other options for Java under Linux.

You may want to visit the Jackcess site on SourceForge and ask about this issue in the discussion forums, or possibly submit a feature request.

Gord Thompson
  • 98,607
  • 26
  • 164
  • 342
  • As I feared. Thanks for the reply. However since I was talking about a pure java library, you should put that in the title because the purpose was to actually be OS independent, not specifically on Linux. Off to the Source Forge forums now. – user3037710 Jun 23 '14 at 12:29