I am trying to use UCanAccess to query a MS Access .accdb file. Everything works great, except when I query multi-value fields. For example those that have entries in the Row
This is the first question about it I have ever seen. You can see an example of the complex types usage with UCanAccess in the ucanaccess web site, tab "Getting Started" (at the end of the page). Here's a junit test case: https://sourceforge.net/p/ucanaccess/code/HEAD/tree/ucanaccess/trunk/src/test/java/net/ucanaccess/test/ComplexTest.java (see the testComplex method).
In particular you can't call rslt.getString(2)
but have to use rslt.getObject(2)
.
You'll get a ucanaccess wrapper of your data.
If you wanted to get string that described the data content you can use
rslt.getObject(2).toString()
.
The wrapping classes are:
net.ucanaccess.complex.Attachment,
net.ucanaccess.complex.SingleValue,
net.ucanaccess.complex.Version.
In your example, rslt.getObject(2)
should return an array of net.ucanaccess.complex.SingleValue
.
Then you can call the method singleValue.getValue() on each array element to get the wrapped value.