db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomcat Programmer <tcprogram...@yahoo.com>
Subject Re: nulls in prepared statement
Date Wed, 20 Jul 2011 21:37:32 GMT

> You must explicitly set value to null:
> if (cobj.getPartNo()==null) pstmt.setNull(1, java.sql.Types.VARCHAR);
> else pstmt.setString(1,cobj.getPartNo());

Hi Peter, thanks for responding but I am aware of this as I indicated in my post. You realize
how tedious this will be with any significant number of fields?  What I am asking about is
if there is an alternate solution.  

Thanks in advance, 

View raw message