db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: behavior of Statement.getGeneratedKeys()
Date Mon, 10 Jul 2006 22:24:19 GMT
Lance J. Andersen wrote:

> Kathey Marsden wrote:
> 
>> Rick Hillegas wrote:

>> Certainly there are these changes for the ResultSet returned by
>> getGeneratedKeys():
>>
>> o  getMetaData()  would  correspond to the ResultSetMetadata of the
>> base table column and so will have different types, columnwidths etc,
>> so formatting and other decisions based on this information may be
>> affected.
> 
> Portable code would adjust accordingly to the correct width.  This is
> what a tool would do.
> 
>> o  getObject()  would  return a different type and applications making
>> casts based on the assumption it is a BigDecimal  may see cast
>> exceptions or other problematic behavior because of this assumption.
> 
> Or because you are returning a BigDecimal when someone is not expecting
> it, you also have problematic behavior.  This fact is buried in the
> Derby docs currently.

Well portable code would adjust accordingly to the type of the returned
object. :-)

Dan.




Mime
View raw message