On Wed, Aug 16, 2006 at 07:22:22AM -0600, Larry Meadors wrote: > > So does this make the error go away?
Yep. > If the database allows null values, you really don't want to use an > int - and you are discovering why. > Even with JDK5 and auto-boxing, if you try to assign a null to an int, > you will get an NPE. So the only way around it is to assign a magic > number ( i.e., 0) to mean null, which IMO is a retarded thing to do on > purpose, but in some cases is the only way. I thought that would work in a way as in ResultSet - for null values when casting to int will result in 0 -- Eugene N Dzhurinsky
