db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: should Clob.getSubstring() allow length of 0?
Date Sat, 15 Jul 2006 01:32:45 GMT
Hi Kathy,

I would probably expect a  SQLException to be thrown in this case or I 
guess you could return nothing.

We did not discuss this stupid human trick in the EG :-)  but i guess we 
should have.

Regards
Lance

Kathey Marsden wrote:
> Lance J. Andersen wrote:
>
>> Derby is correct.  The clarified JDBC 4 javadocs indicates the 
>> following:
>
>
>>         |pos| - the first character of the substring to be extracted.
>>         The first character is at position 1.
>>         |length| - the number of consecutive characters to be copied
> Thanks Lance for looking at this.  The question is about the length.  
> The length in this case is 0.
> From the DDLUtils code it looked like this where clob.length() was 0.
>
> value = clob.getSubString(1, (int)clob.length());
>
> Is this  ok to send length 0 or to specify position 1 if there is no 
> character there?
>
> *
> *

Mime
View raw message