sbSql.append("WHERE UPPER(UUID)=?");
// establish the connection
ManagedConnection mc = returnConnection();
Connection con = mc.getJdbcConnection();
IClobMutator cm = mc.getClobMutator();
st = con.prepareStatement(sbSql.toString());
int n = 1;
// TODO: In rare cases setStream doesn't work correctly - looks like stream
// is being cut and not flushed entirelly, thus making problems with reading
// the report.
// In this case old good 'set' is being used until further investigation
//cm.setStream(st, n++, report, length);
String sReport = "";
try {
sReport = convertReportIntoString(report);
} catch (IOException ex) {
} finally {
try {
report.close();
} catch (IOException ex) {}
}
cm.set(st, n++, sReport);
st.setString(n++, record.getUuid());
st.executeUpdate();