User eda6f877b4
13-03-2014 12:42:30
Hi
Looking for guidance here..
I am inserting a structure and is allowing dublicate structures. After inserting, what is the best way to retrive the id of the inserted row (cd_id)??
Currently I am doing this:
UpdateHandler uh = new UpdateHandler(conh, UpdateHandler.INSERT, structureTableName, null);
try {
uh.setStructure(Encoding.Default.GetBytes(molfile));
uh.execute();
// getting the id from the newly registered structure
searcher.setQueryStructure(molfile);
searcher.run();
registered_cd_id = searcher.getResult(0);
} catch (Exception ex) {
} finally {
uh.close();
}