Hi.
I'm working with molecules in an application, and I want to store them in a
database. So, I would like to know how I can to store a molecule what I have
in a Molecule (or AtomContainer) object. The type in which I store the
molecule in the database table is a Long Row, so I need to use the method
PreparedStatement.setBinaryStream (JDBC).
To read a molecule from de db I use the following code:
ResultSet rset = stmt.executeQuery(" .... ");
...
IChemObjectReader reader = new ReaderFactory().createReader(
rset.getBinaryStream("structure"));
ChemObject cmol = (ChemObject) reader.read( new
org.openscience.cdk.Molecule());
IAtomContainer iaTemp = (IAtomContainer) cmol;
I've tried to "reverse" the code to adapt for write a molecule, but I've not
obtained it. Any idea??
Thanks a lot.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user