I am using IBM websphere commerce and db2, have following piece of code
Clob clobVar = null;
if (result.elementAt(3) != null)
clobVar = (Clob) result.elementAt(3);
if (clobVar == null) {
infoTable.put("EInfo", "");
} else {
stringTemp = clobVar.getSubString(1, (int) clobVar.length());
infoTable.put("EInfo", stringTemp);
}
Code works fine till
clobVar = (Clob) result.elementAt(3);
but as soon as execution comes to
stringTemp = clobVar.getSubString(1, (int) clobVar.length());
System throws an exception
[jcc][10120][11936][4.3.111] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null
What I am doing wrong?
How to resolve this issue?