update Oracle number field using updateHandler

ChemAxon 60ee1f1328

27-10-2006 11:43:22

Hello,





uh.setValueForAdditionalColumn(1,"String"); compiles OK however


if I try uh.setValueForAdditionalColumn(1,int_or_double); then for obvious reasons this does not compile, so my question is , is it possible to update an Oracle NUMBER column in a JChem Table using updateHandler? I guess I would need to access the cd_id but there appears to be no updateHandler.getCDID type function but curiously there is a updateHandler.setCDID (which I thought might not be allowed)...





Comments valued as ever,


Daniel.

ChemAxon 9c0afc9aaf

31-10-2006 08:18:30

Dear Daniel,
Quote:



if I try uh.setValueForAdditionalColumn(1,int_or_double); then for obvious reasons this does not compile, so my question is , is it possible to update an Oracle NUMBER column in a JChem Table using updateHandler?
Yes, because it expects an Object.


You can use the Object wrapper types of primitive types: Integer, Double and so on.





A nice freely downloadable Java book I recommend is Thinking in Java, available at:


http://bruceeckel.com/
width="90%" cellspacing="0" cellpadding="3" border="0" align="center"> Quote: I guess I would need to access the cd_id but there appears to be no updateHandler.getCDID type function Use UpdateHandler.execute(true) to retrieve the cd_id for the last structure.


http://www.chemaxon.com/jchem/doc/api/chemaxon/jchem/db/UpdateHandler.html#execute(boolean)





Best regards,





Szilard