db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eranda Sooriyabandara <0704...@gmail.com>
Subject Re: problem with cast (null as int)
Date Tue, 04 Aug 2009 04:56:16 GMT
Hi Bryan,Thanks for the help and it now works.
>>I think this is DERBY-1938 (
Yes it is.
 I understand the change you did.
Though we cast null into integer it remains as the same and it just help to
pass from,
rs = st.executeQuery("values (3, cast (null as int))");
which does not allow null in the values.
But after we cast, it proceed as a null object(not null Integer) and when
execution time it gave the NullPointerException. We cannot directly cast the
null into Integer ((INTEGER)rs.getObject(i)). But we can do it by give the
data type as integer,
pSt.setObject(i, rs.getObject(i), Types.INTEGER);
Am I correct in understanding?


View raw message