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.
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.
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.