Derby is correct. The clarified JDBC 4 javadocs indicates the
java.lang.String getSubString(long pos,
- Retrieves a copy of the specified substring in the
value designated by this
Clob object. The substring
begins at position
pos and has up to
pos - the first character of the substring to be
extracted. The first character is at position 1.
length - the number of consecutive characters to
String that is the specified substring in the
CLOB value designated by this
SQLException - if there is an
error accessing the
CLOB value or if pos is less than 1
if the JDBC driver does not support this method
Hopefully you will find many mysteries solved in JDBC 4 (and yes i am
sure there are still some, but we knocked a ton of the off)
Kathey Marsden wrote:
recent thread the question came up.
Derby does not allow a length of 0 for Clob.getSubstring().
Is this a bug in Derby? I am not sure from reading the javadoc: