Is there any way that we can get the value from a TAG type column as a single value. If the TAG field contains multiple values it should be clubbed using some delimiter like comma and returned.
Also is there any document listing the type information and handling the each type from the resultset.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Check the "Working with Complex Types" section of the Getting Started page of the website. Multi-value lookup fields are returned as an array of net.ucanaccess.complex.SingleValue objects. If you want a single delimited list of values you could build it by iterating over that array.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Gord
Im new to using ucanaccess but i have put together a piece of java code to access a microssoft access database and retrieve value from it using Resultset rs.getString("Identifier") function okay. this works for a single entry field.
i am however having an issue with database entry that has multiple values in one field.
i am trying to use below code
rs.getObject("identifier");StringReticle_test=rs.getObject("identifier").toString();System.out.println(" multiple items in field are "+Reticle_test);butikeepgettingthebelowoutputLnet.ucanaccess.complex.SingleValue;@4c9859cf"AnyhelpwouldbeappreciatedAttachedisimageofdatabase,itemsiamstrugglingtoretrievearethemultipleentriesinunderReticlesheader.James
Have a closer look at the example code in my previous post. For a multi-valued lookup field getObject returns an array of SingleValue objects that you need to "stringify". Simply calling toString just shows you the string representation of the object, not its contents.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Is there any way that we can get the value from a TAG type column as a single value. If the TAG field contains multiple values it should be clubbed using some delimiter like comma and returned.
Also is there any document listing the type information and handling the each type from the resultset.
Check the "Working with Complex Types" section of the Getting Started page of the website. Multi-value lookup fields are returned as an array of
net.ucanaccess.complex.SingleValueobjects. If you want a single delimited list of values you could build it by iterating over that array.Example: For a table named [Donors]
we can use the following code in Java 8:
Hi Gord
Im new to using ucanaccess but i have put together a piece of java code to access a microssoft access database and retrieve value from it using Resultset rs.getString("Identifier") function okay. this works for a single entry field.
i am however having an issue with database entry that has multiple values in one field.
i am trying to use below code
Have a closer look at the example code in my previous post. For a multi-valued lookup field
getObjectreturns an array ofSingleValueobjects that you need to "stringify". Simply callingtoStringjust shows you the string representation of the object, not its contents.