[OJB-developers] Error in JdbcAccess.java
Brought to you by:
thma
|
From: Bradley A. S. <br...@ba...> - 2002-06-13 16:13:16
|
I believe the calls to getSubString and getBytes are incorrect.
case Types.CLOB :
{
java.sql.Clob aClob = rs.getClob(columnId);
result = aClob.getSubString(0L, (int) aClob.length());
break;
}
case Types.BLOB :
{
java.sql.Blob aBlob = rs.getBlob(columnId);
result = aBlob.getBytes(0L, (int) aBlob.length());
break;
}
According to the Javadoc for java.sql.Blob, the first parameter of getBytes
or getSubString is the position, and the first byte/character is at position
1, not position 0.
Thanks,
Bradley
|